正则表达式限制输入框只能输入数字 代码如下:
<input type="text" onkeyup="this.value=this.value.replace(/[^\d]/g,'') " onafterpaste="this.value=this.value.replace(/[^\d]/g,'') " name="f_order" value="1"/>
<input type="text" on
其中,on
输入框只能输入字母和下横线的正则表达式
<input on
输入框只能输入字母数字和下横线的正则表达式
<input on
或
<input on