实例代码“Ctrl+/”提示“F11/ESC”全屏 返回 格式化 恢复 运行
x
 
1
<!DOCTYPE html>
2
<html>
3
<head>
4
    <title>String Type Case Methods Example</title>
5
    <script type="text/javascript">
6
    
7
        var stringValue = "hello world";
8
        alert(stringValue.toLocaleUpperCase());  //"HELLO WORLD"
9
        alert(stringValue.toUpperCase());        //"HELLO WORLD"
10
        alert(stringValue.toLocaleLowerCase());  //"hello world"
11
        alert(stringValue.toLowerCase());        //"hello world"
12
13
    </script>
14
</head>
15
<body>
16
17
</body>
18
</html>