1024programmer Java Use js regular to control the input tag to only allow input values ​​_javascript skills

Use js regular to control the input tag to only allow input values ​​_javascript skills

style=”ime-mode:Disabled”
This sentence is more practical. It means to close the input method. This will save some people from crying to you when they input numbers with full-width settings, but they can’t input the data, blaming your poor design.

Only numbers are allowed

The code is as follows:




Only English letters, numbers and underscores are allowed to be entered (implemented by the following two methods)

The code is as follows:





Only English letters, numbers and &= are allowed to be entered. @

The code is as follows:




Only Allow input of Chinese characters

The code is as follows:




Example : Limit the input of three digits to only numbers or ‘.’ and turn off the input method in the input

The code is as follows:


Discount





This article is from the internet and does not represent1024programmerPosition, please indicate the source when reprinting:https://www.1024programmer.com/633035

author: admin

Previous article
Next article

Leave a Reply

Your email address will not be published. Required fields are marked *

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索