<
script language
=
"
JavaScript
"
>
<!--
n = " 1279834847944074100465236.33 "
re =/ (d{ 1 , 3 })( ?= (d{ 3 }) + ( ? :$ | .)) / g
n1 = n.replace(re, " $1, " )
alert(n + " " + n1)
// -->
</ script >
<!--
n = " 1279834847944074100465236.33 "
re =/ (d{ 1 , 3 })( ?= (d{ 3 }) + ( ? :$ | .)) / g
n1 = n.replace(re, " $1, " )
alert(n + " " + n1)
// -->
</ script >
http://www.cnblogs.com/bestcomy/archive/2005/07/25/199998.html