javascript中去掉字符串前面的0
时间:2014-07-13 11:48:17
收藏:0
阅读:385
var str = "00012300325300"; str = str.replace(/\b(0+)/gi,""); // 去掉字符串前面的0 document.write("str=" + str + "</br>");
上面代码中replace的正则表达式就是去掉字符串前面的0
javascript中去掉字符串前面的0,布布扣,bubuko.com
原文:http://www.cnblogs.com/b302/p/3837664.html
评论(0)