如何在JavaScript中将字符串转换为小写字母?
原创
要将 JavaScript 中的字符串转换为小写字母,请使用 toLocaleLowerCase() 方法。
示例
您可以尝试运行以下代码来了解如何在 JavaScript 中使用 toLocaleLowerCase() 方法 -
实时演示
<!DOCTYPE html> <html> <body> <script> var a = "WELCOME!"; document.write(a.toLocaleLowerCase()); </script> </body> </html>
以上就是如何在JavaScript中将字符串转换为小写字母?的详细内容,更多请关注IT视界其它相关文章!