該方法返回撥用字串值轉換為大寫。
string.toUpperCase( )
下面是引數的詳細資訊:
NA
返回表示指定物件的字串
<html> <head> <title>JavaScript String toUpperCase() Method</title> </head> <body> <script type="text/javascript"> var str = "Apples are round, and Apples are Juicy."; document.write(str.toUpperCase( )); </script> </body> </html>
這將產生以下結果:
APPLES ARE ROUND, AND APPLES ARE JUICY.