<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"/>
原文:http://www.cnblogs.com/kedoudejingshen/p/3775287.html