js字母大小写转换方法

js字母大小写转换方法:
1、转换成大写:toUpperCase()
2、转换成小写:toLowerCase()
3、举例:
(1)var a="aBcD";
a=a.toUpperCase();
alert(a);
提示出来的就是 ABCD
(2)var a="aBcD";
a=a.toLowerCase();
alert(a);
提示出来的就是 abcd
posted @ 2017-06-03 14:56  写代码的罂粟  阅读(101912)  评论(0编辑  收藏  举报