In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
2025-10-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces how jQuery uses regular expressions to verify mobile phone numbers, ID numbers, and Chinese names. It has a certain reference value, and interested friends can refer to it. I hope you can learn a lot after reading this article.
Digital judgment method: isNaN () function
The test () method determines whether the regular expression content is matched in the string, and returns a Boolean value (true / false).
/ / verify the Chinese name function isChinaName (name) {var pattern = / ^ [\ u4E00 -\ u9FA5] {1GHI 6} $/; return pattern.test (name);} / verify the mobile phone number function isPhoneNo (phone) {var pattern = / ^ 1 [34578]\ d {9} $/; return pattern.test (phone) } / / verify ID card function isCardNo (card) {var pattern = / (^\ d {15} $) | (^\ d {18} $) | (^\ d {17} (\ d | X | x) $) /; return pattern.test (card) } Thank you for reading this article carefully. I hope the article "how to verify your mobile phone number, ID number and Chinese name with regular expressions by jQuery" shared by the editor will be helpful to you. At the same time, I hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
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: 0
*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.

The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope





About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.