toUpperCase 方法

把字符串转换为大写。

语法:
  1. stringObject.toUpperCase();
返回值:

一个新的字符串,在其中 stringObject 的所有小写字符全部被转换为了大写字符。

示例:
  1. var Str = "hello graybobo";
  2. console.log( Str.toUpperCase() );
结果:
  1. >>>
  2. HELLO GRAYBOBO