In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you an example of Javascript using regular verification ID numbers, I believe most people do not know much about it, so share this article for your reference, I hope you will learn a lot after reading this article, let's go to know it!
The characteristic of JavaScript 1.JavaScript is mainly used to add interactive behavior to HTML pages. 2.JavaScript can be embedded directly into HTML pages, but writing as a separate js file facilitates the separation of structure and behavior. 3.JavaScript has cross-platform features and can run on multiple platforms with the support of most browsers.
The ID card is 15 or 18 digits, the 15 digits are all digits, the first 17 digits of the 18 digits are numbers, and the last digit is a number or capital letter "X".
The regular expression that matches:
(^\ d {15} $) | (^\ d {17} ([0-9] | X) $)
Take Javascript as an example to illustrate:
FunctionisIdCardNo (num) {num = num.toUpperCase (); / / the ID number is 15 or 18 digits, all digits are 15 digits, the first 17 digits of the 18 digits are digits, and the last digit is the check bit, which may be a number or character X. If (! / (^\ d {15} $) | (^\ d {17} ([0-9] | X) $) / .test (num)) {alert ('the ID number entered is incorrect or the number does not conform to the regulations! \ n15-digit numbers should be all digits, and the last digits of 18-digit numbers can be digits or X. ; returnfalse;};}'). AddClass ('pre-numbering'). Hide (); $(this) .addClass (' has-numbering'). Parent (). Append ($numbering); for (I = 1; I
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.