toUpperCase 方法语法:返回值:示例:结果:toUpperCase 方法 把字符串转换为大写。 语法: stringObject.toUpperCase(); 返回值: 一个新的字符串,在其中 stringObject 的所有小写字符全部被转换为了大写字符。 示例: var Str = "hello graybobo"; console.log( Str.toUpperCase() ); 结果: >>> HELLO GRAYBOBO