限制input只能输入正整数
<input type="text" autocomplete="off" name="title" class="matTopR_p_input" value="0" onkeyup="this.value=this.value.replace(/\D/g,'')"onafterpaste="this.value=this.value.replace(/\D/g,'')"/>
onkeyup:会在键盘按键被松开时触发;
onafterpaste:粘贴触发;
时间:2023-06-05 01:12:37
<input type="text" autocomplete="off" name="title" class="matTopR_p_input" value="0" onkeyup="this.value=this.value.replace(/\D/g,'')"onafterpaste="this.value=this.value.replace(/\D/g,'')"/>
onkeyup:会在键盘按键被松开时触发;
onafterpaste:粘贴触发;
广西桂林市中考满分作文-为了地球的明天1200字作文素材大全
2024-07-30