JS加千分符
2020-12-13 01:56
阅读:493
标签:java c javascript a js doc JS加千分符,搜素材,soscw.com JS加千分符 标签:java c javascript a js doc 原文地址:http://www.cnblogs.com/kevin1988/p/3713716.html
n="1279834847944074100465236.33"
re=/(\d{1,3})(?=(\d{3})+(?:$|\.))/g
n1=n.replace(re,"$1,")
alert(n+"\r\n"+n1)
document.write(n+"\r\n"+n1);
评论
亲,登录后才可以留言!