javascript字符串大写怎么转为小写
时间:2022-02-11 16:01
在javascript中,可以使用toLowerCase()方法来将大写字符串转为小写,该方法可以把字符串中所有大写字符全部转换为小写字符,语法格式“string.toLowerCase()”。 本教程操作环境:windows7系统、javascript1.8.5版、Dell G3电脑。 在javascript中,可以使用toLowerCase()函数来将大写字符串转为小写。 下面通过示例了解一下: 输出: 输出: 说明: toLowerCase()方法用于把字符串转换为小写,可以把该字符串中所有大写字符全部被转换为了小写字符。 语法 返回值 一个新的小写字符串。 【相关推荐:javascript学习教程】 以上就是javascript字符串大写怎么转为小写的详细内容,更多请关注gxlsystem.com其它相关文章!var str="Hello World!"
console.log(str.toLowerCase());
var str="HELLO WORLD!"
console.log(str.toLowerCase());
stringObject.toLowerCase()