Style= "Ime-mode:disabled"
This sentence is more practical. Closes the input method. Saves some people to open the full angle input number, the result input does not go in to seek your kutianmalei, also blames you to design is not good.
Only allow numbers to be entered
Copy Code code as follows:
<input name= "username" type= "text" onkeyup= "Value=this.value.replace (//d+/g, ')" >
Only English letters, numbers, and underscores are allowed (in the following two ways)
Copy Code code 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 &=@ are allowed
Copy Code code as follows:
<input name= "username" type= "text" onkeyup= "Value=value.replace (/[^/w=@&]|_/ig, ')" >
Only allow Chinese characters to be entered
Copy Code code as follows:
<input name= "username" type= "text" onkeyup= "Value=value.replace (/[^/u4e00-/u9fa5]/g, ')" >
Instance: limit input three digits can only be digits or '. ' and close the input method within input
Copy Code code as follows:
<th style= "width:60px;" > Folding buckle </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: ' Please fill in the discount number ' '/>
<span style= ' white-space:pre ' >
& Lt;/span></td>