Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Use regular expression full-width half-width restriction when entering input

2025-03-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

Member ID

Third, only integers are allowed. In fact, it is entirely possible to impose some restrictions in accordance with Article 3.

Function onlyNum ()

{

If (! (event.keyCode==46) & &! (event.keyCode==8) & &! (event.keyCode==37) & &! (event.keyCode==39))

If (! (event.keyCode > = 48&&event.keyCode=96&&event.keyCode)

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

Third, only integers are allowed. In fact, it is entirely possible to impose some restrictions in accordance with Article 3.

Function onlyNum ()

{

If (! (event.keyCode==46) & &! (event.keyCode==8) & &! (event.keyCode==37) & &! (event.keyCode==39))

If (! (event.keyCode > = 48&&event.keyCode=96&&event.keyCode)

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

Only Chinese characters are allowed to be input

Only Chinese characters are allowed to be input

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 208

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report