正则表达式去存空格
<script>
//輸入數字驗證
function isNumber(v) {
return v.replace(/[^\d\.\-]/g,'');
}
</script>
<input id="storageDetail_price" class="txt01 txt02" type="text" οnblur="changeprice(this)" οnkeyup="this.value = isNumber(this.value);" name="storageDetail.price" value="" size="2"/>
轉載于:https://www.cnblogs.com/kedoudejingshen/p/3775287.html
總結
- 上一篇: setjump longjump
- 下一篇: atitit.软件开发方法总结O6