时间:2021-07-01 10:21:17 帮助过:4人阅读
该方法返回调用字符串值转换为大写。
语法
string.toUpperCase( )
下面是参数的详细信息:
返回值:
例子:
<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.