Style = "ime-mode: Disabled"
This sentence is more practical. To disable the input method. It saves some people the trouble of entering numbers in full angles, and the result cannot be entered to find you crying. It is also a blame for your poor design.
Only numbers are allowed.
Copy codeThe Code is as follows:
<Input name = "username" type = "text" onkeyup = "value = this. value. replace (// D +/g,'') ">
Only English letters, numbers, and underscores (_) are allowed)
Copy codeThe Code is as follows:
<Input name = "username" type = "text" style = "ime-mode: disabled">
<Input name = "username" type = "text" onkeyup = "value = value. replace (/[^/w/. //]/ig,'') ">
Only English letters, numbers, and @ can be entered @
Copy codeThe Code is as follows:
<Input name = "username" type = "text" onkeyup = "value = value. replace (/[^/w = @ &] | _/ig,'') ">
Only Chinese characters are allowed.
Copy codeThe Code is as follows:
<Input name = "username" type = "text" onkeyup = "value = value. replace (/[^/u4E00-/u9FA5]/g,'') ">
Example: Restrict three inputs to numbers or '.' and disable the input method in the input.
Copy codeThe Code is as follows:
<Th style = "width: 60px;"> discount </th>
<SPAN style = "WHITE-SPACE: pre">
</SPAN> <td> <input name = "discountNum" class = "easyui-validatebox" maxlength = "3" style = "ime-mode: disabled "onkeyup =" value = this. value. replace (/[^ \ d.] /g, '')" data-options = "required: 'true', missingMessage: 'Enter the discount number'"/>
<SPAN style = "WHITE-SPACE: pre">
</SPAN> </td>