此方法返回转换为大写的调用字符串值。
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.
祝学习愉快!(内容编辑有误?请选中要编辑内容 -> 右键 -> 修改 -> 提交!)