toLowerCase()

优质
小牛编辑
120浏览
2023-12-01

toLowerCase 方法

把字符串转换为小写。

语法:

  stringObject.toLowerCase();

返回值:

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

示例:

  var Str = "Hello KILLHAPPY";

  console.log( Str.toLowerCase() );

结果:

  >>>
  hello killhappy