1 <!DOCTYPE html>
2 <html lang="en">
3 <head>
4 <meta charset="UTF-8">
5 <title>Document</title>
6 </head>
7 <body>
8 <script>
9 var str = "abcdEFG"; 10 //转换成小写
11 console.log(str.toLowerCase()); 12 //转换成大写
13 console.log(str.toUpperCase()); 14 </script>
15 </body>
16 </html>