返回到:JavaScript对象:JavaScript String 对象
定义和用法
toLowerCase() 方法用于把字符串转换为小写。
语法
string.toLowerCase()
所有主要浏览器都支持 toLowerCase() 方法
例子
把字符串转换为小写:
HTML
x
16
16
1
2
<html>
3
<head>
4
<meta charset="utf-8">
5
<title>Web176教程(Web176.com)</title>
6
</head>
7
<body>
8
9
<script>
10
var txt="Web176";
11
document.write(txt.toLowerCase() + "<br>");
12
document.write(txt.toUpperCase());
13
</script>
14
15
</body>
16
</html>
阅读剩余 69%
作者:terry,如若转载,请注明出处:https://www.web176.com/javascriptbook/jsarrtips/3037.html