正则表达式去存空格

<script>
//输入数字验证
function isNumber(v) {
return v.replace(/[^\d\.\-]/g,'');
}
</script>
<input id="storageDetail_price" class="txt01 txt02" type="text" onblur="changeprice(this)" onkeyup="this.value = isNumber(this.value);" name="storageDetail.price" value="" size="2"/>

posted on 2014-06-07 19:38  蝌蚪的精神  阅读(155)  评论(0编辑  收藏  举报

导航