Function isidcardno (Num){VaR factorarr = new array );VaR error;VaR vararray = new array ();VaR intvalue;VaR lngproduct = 0;VaR intcheckdigit;VaR intstrlen = num. length;VaR idnumber = num;// InitializeIf (intstrlen! = 15) (intstrlen! = 18 )){// Error = "the length of the ID card number entered is incorrect! ";// Alert (error );// Frmadduser.txt idcard. Focus ();Return false;}// Check and Set ValueFor (I = 0; I Vararray [I] = idnumber. charat (I );If
ID card number verification
Http://blog.donews.com/gxgx/category/39640.aspx? Pagenumber = 1
/*-------------------------------------------------------------------------------* Function name: Boolean gf_check_identity (string as_identity)* Function: verify the correctness of the ID card number input (you can determine the 18th-bit
Because I needed to perform the escalation, verification, and query of the 15-digit old ID card number, and did not find any ready-made functions, I wrote a simple process and hoped to help my friends.This function has a single function and can only verify whether the 18th-bit number is correct or obtain the 18th-bit number. Other functions can be expanded by yourself!'Version: 1.0.1'Author: sfply (sfply@16
China ID card number verification
Using System;
/// /// Summary description for IDCardValid/// Public class IDCardValid{Public IDCardValid (){//// TODO: Add constructor logic here//}
/// /// Verify the ID card number/// /// /// Public static bool CheckIDCard (string Id){If (Id
JS mobile phone number, zip code, area code, ID card Verification program
Mobile phone Number Inquiryfunction Checkmobile () {var smobile = Document.mobileform.mobile.valueif (!) ( /^13[0-9]d{4,8}$/.test (Smobile))) {Alert ("Please enter your mobile number (at least the first 7 digits)");Document.mobileform.mobile.focus ();return false;}}Postcode inquiryfunction Checkpost () {var spost = Document.postform.
This article examples need to verify the content: Chinese name, mobile phone number, ID card and address, verification methods to share for everyone to reference, the specific content as follows
HTML (Form):
jquery Validation:
The Test () method determines whether the string matches a regular expression content, and returns a Boolean value (True/false)
Verify that the Chinese name fu
ID card verification code calculation
It turns out that the last X of my ID is actually 2.
Public function id_verify ($ my_id ){
$ Coefficient = array (, 2 );
$ Remainder_map = array (, 'X', 9, 8, 5, 4, 3, 2 );
$ Count = 0;
For ($ I = 0; $ I
$ Count + = $ my_id [$ I] * $ coefficient [$ I
It was a fresh morning to start our new test journey.2-in the second test, the correct gender information is obtained from the ID number. ==> very simple. The second test is easy to write based on the gourd image.
==> Surprised, why not? I don't know, failed is the norm in the test process.
==> Okay, let's see where the error is?
The gender code is verified, and it is a full set. Why is the address not verified? This inconsisten
China's second generation ID card verification js Code, China's second generation js Code
The following part of the code is taken from a large webpage. I will not give the url any more. below is the corresponding js Code:
IW = new Array (,); iSum = 0; for (I = 0; I
Common regular Expressions Daquan, mobile phone, phone, email, ID card (the most stringent authentication), IP address, URL, date, etc., the general front of the JS verification
The following part of the code interception from a grand Web page, specifically I will not give the URL, the following is the corresponding JS code:IW = new Array (7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2,1); isum = 0; for (i=0;iChina second-generation ID card Verification JS code
) + (0*10) + (8*5) + (0*8) + (1* 4) + (1*2) "is 189, and then with 189 divided by 11 The result is 189/11=17----2, which means the remaining number is 2. Finally, the corresponding rule can know that the remainder 2 corresponding to the test code is x. So, you can decide that this is a correct ID number.Above excerpt from Baidu Encyclopedia.
This is a picture of the relevant information found on the Internet.
Based on the known data, we can write
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.