作用
toUpperCase() 方法用于把字符串转换为大写。
toLowerCase() 方法用于把字符串转换为小写。
例子
var txt="Hello World!"
document.write("<p>Lowercase: " + txt.toLowerCase() + "</p>")
document.write("<p>Uppercase: " + txt.toUpperCase() + "</p>")
Lowercase: hello world!
Uppercase: HELLO WORLD!