1. Text box can only enter numeric code ( Decimal point cannot be entered )
<input οnkeyup="this.value=this.value.replace(//D/g,'')"

2. Only numbers can be entered , Can input decimal point .
<input οnkeyup="if(isNaN(value))execCommand('undo')"
<input name=txt1 οnchange="if(//D/.test(this.value)){alert(' Only numbers can be entered

3. Number and decimal point method 2
<input type=text t_value="" o_value=""

4. Only letters and Chinese characters can be entered
<input οnkeyup="value=value.replace(/[/d]/g,'')
maxlength=10 name="Numbers">

5. Only English letters and numbers can be entered , Cannot enter Chinese
<input οnkeyup="value=value.replace(/[^/w/.//]/ig,'')">

6. Only numbers and English can be entered <font color="Red">chun</font>
<input onKeyUp="value=value.replace(/[^/d|chun]/g,'')">

7. There can be no more than two decimal places ( number , Chinese can be input ), Letters and symbols cannot be entered :
<input onKeyPress="if((event.keyCode<48 || event.keyCode>57) &&
event.keyCode!=46 || //./d/d$/.test(value))event.returnValue=false">

8. There can be no more than two decimal places ( number , letter , Chinese can be input ), You can enter operation symbols :

©2019-2020 Toolsou All rights reserved,
It's unexpected Python Cherry tree (turtle The gorgeous style of Library )html Writing about cherry trees , Writing about cherry trees java Four functional interfaces ( a key , simple ) Browser kernel ( understand )06【 Interpretation according to the frame 】 Data range filtering -- awesome HashMap Explain in detail os Simple use of module computer network --- Basic concepts of computer network ( agreement , system ) Some East 14 Pay change 16 salary , Sincerity or routine ?