原文:js 验证input文本框只能输入数字和小数点

function check e var re d . , d if e.value if re.test e.value alert 请输入正确的数字 e.value e.focus input type text id score style width: px name score onblur check this onkeyup this.value this.value.replace ...

2021-12-08 09:31 1 862 推荐指数:

查看详情

输入框input只能输入数字小数点

输入框input只能输入数字小数点 只允许输入数字(整数:小数点不能输入)<input type="text" onkeyup="value=value.replace(/[^\d]/g,'')" > 允许输入小数(两位小数)<input type ...

Tue Aug 20 00:21:00 CST 2019 0 2493
输入框input只能输入数字小数点

只允许输入数字(整数:小数点不能输入)<input type="text" onkeyup="value=value.replace(/[^\d]/g,'')" > 允许输入小数(两位小数)<input type="text" onkeyup="value ...

Tue Apr 28 21:57:00 CST 2020 0 3178
输入框input只能输入数字小数点

只允许输入数字(整数:小数点不能输入)<input type="text" onkeyup="value=value.replace(/[^\d]/g,'')" > 允许输入小数(两位小数)<input type="text" onkeyup="value ...

Tue Jan 07 17:12:00 CST 2020 5 3437
输入框input只能输入数字小数点

只允许输入数字(整数:小数点不能输入)<input type="text" onkeyup="value=value.replace(/[^\d]/g,'')" > 允许输入小数(两位小数)<input type="text" onkeyup="value ...

Mon Feb 11 22:32:00 CST 2019 1 8424
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM