对于主机区域设置,如何在 JavaScript 中将字符串转换为小写字母?
htmlprogramming scriptsjavascript更新于 2024/6/3 17:16:17
要在 JavaScript 中将字符串转换为小写字母,请使用 toLocaleLowerCase() 方法。
示例
您可以尝试运行以下代码来了解如何在 JavaScript 中使用 toLocaleLowerCase() 方法 −
<!DOCTYPE html> <html> <body> <script> var a = "WELCOME!"; document.write(a.toLocaleLowerCase()); </script> </body> </html>
相关文章
有用资源
html 参考教程 - 该教程包含有关 html 的更多信息:https://www.cainiaomax.com/html/

