输入框input只能输入数字和小数点 只允许输入数字(整数:小数点不能输入)<input type="text" onkeyup="value=value.replace(/[^\d]/g,'')" > 允许输入小数(两位小数)<input type ...
输入框input只能输入数字和小数点 只允许输入数字(整数:小数点不能输入)<input type="text" onkeyup="value=value.replace(/[^\d]/g,'')" > 允许输入小数(两位小数)<input type ...
只允许输入数字(整数:小数点不能输入)<input type="text" onkeyup="value=value.replace(/[^\d]/g,'')" > 允许输入小数(两位小数)<input type="text" onkeyup="value ...
只允许输入数字(整数:小数点不能输入)<input type="text" onkeyup="value=value.replace(/[^\d]/g,'')" > 允许输入小数(两位小数)<input type="text" onkeyup="value ...
只允许输入数字(整数:小数点不能输入)<input type="text" onkeyup="value=value.replace(/[^\d]/g,'')" > 允许输入小数(两位小数)<input type="text" onkeyup="value ...
简便的实现一个输入框,只能包含数字和小数点: <input type="text" id="amountValue" onkeyup="if(isNaN(value)){execCommand('undo');alert('Please enter a valid value. ...
...
HTML5 可以用:<input type="number">html4 的话只能用js实现了:<input type="text" onkeyup="this.value=this.value.replace(/\D/g, '')">上面的只能输入整数。如果需要小数正则 ...