javascript 转换大小写字母

 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>

 

posted @ 2018-04-15 00:29  叶子玉  阅读(7195)  评论(0编辑  收藏  举报