QQ Group of brothers asked "who gave me an ID card number to verify the code" Just I also need to find the next code from the Internet, feel good, suitable for 15 and 18 ID card, online good garbage station, are directly collected csdn problem, the answer is no, Han
Use JavaScript to verify 15 or 18 ID card number, the most outrageous thing, unexpectedly someone search me a identity card number, give me an ID card look like everyone is very strong ah, it is possible that everyone is to have an ID generator it, OK, I provide the next bar
Copy Code code as follows:
function Checkidcard (str)
{//ID card Regular expression (15-bit)
Isidcard1=/^[1-9]\d{7} ((0\d) | ( 1[0-2])) (([0|1|2]\d) |3[0-1]) \d{3}
$/;
Identity card Regular expression (18-bit)
Isidcard2=/^[1-9]\d{5}[1-9]\d{3} ((0\d) | ( 1[0-2])) (([0|1|2]\d) |3
[0-1]) \d{4}$/;
Verify ID, return result
Return (Isidcard1.test (str) | | Isidcard2.test (str));
}
The following is an ID generator ah, illegal things ah, want to find me ah, please do not engage in illegal
Good thing, I checked, really, it's amazing.