该方法返回调用字符串值转换为大写。
语法
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.
最后
以上就是活泼大门最近收集整理的关于简介JavaScript中toUpperCase()方法的使用的全部内容,更多相关简介JavaScript中toUpperCase()方法内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复