JavaScript toUpperCase() 方法
最后更新于:2022-03-26 22:06:25
JavaScript toUpperCase() 方法
JavaScript String 对象
定义和用法
toUpperCase() 方法用于把字符串转换为大写。
语法
浏览器支持





所有主要浏览器都支持 toUpperCase() 方法
实例
实例
把字符串转换为大写:
var str="Runoob";
document.write(str.toUpperCase());
尝试一下 »
JavaScript String 对象