The input box can only enter regular expressions for letters and dashes
<type= "text" onkeyup= "This.value=this.value.replace (/[^_a-za-z] /g, ') " onpaste=" This.value=this.value.replace (/[^_a-za-z]/g, ') ">
You can only enter numbers and English
<type= "text" onkeyup= "This.value=this.value.replace (/[\w]/g,") " onpaste=" This.value=this.value.replace (/[\w]/g, ') ">
The input box can only enter regular expressions for alphanumeric and horizontal lines
<type= "text" onkeyup= "This.value=this.value.replace (/[^\w]/g, '" ) " onpaste=" This.value=this.value.replace (/[^\w]/g, ') ">
Or
<type= "text" onkeyup= "This.value=this.value.replace (/[\w]/g,") " onpaste=" This.value=this.value.replace (/[\w]/g, ') ">
You can only enter Chinese
<type= "text" onkeyup= "This.value=this.value.replace (/[^\u4e00-\ u9fa5]/g, ') " onafterpaste=" This.value=this.value.replace (/[^\u4e00-\u9fa5]/g, ') "/ >
Only full-width characters can be entered
<type= "text" onkeyup= "This.value=this.value.replace (/[^\uff00-\ uffff]/g, ') " onafterpaste=" This.value=this.value.replace (/[^\uff00-\uffff]/g, ') "/ >
Only input boxes that enter numbers, letters, and Chinese