标签:
<script type="text/javascript">
onload = function(){
var a = "23.456322";
var aNew;
var re = /([0-9]+\.[0-9]{2})[0-9]*/;
aNew = a.replace(re,"$1");
alert(aNew);
}
</script>
标签:
原文地址:http://www.cnblogs.com/sntetwt/p/4613016.html