js 去掉字符串前面的0

<script>
var a='00123';
alert(a.replace(/\b(0+)/gi,""));
</script>
posted @ 2015-02-11 13:41  刘振明  阅读(41773)  评论(0编辑  收藏  举报