Home  >  Article  >  Web Front-end  >  javascript 身份证号码验证函数(可辨真伪,支持15或18位身份证号)测试误差为0_javascript技巧

javascript 身份证号码验证函数(可辨真伪,支持15或18位身份证号)测试误差为0_javascript技巧

WBOY
WBOYOriginal
2016-05-16 18:26:221142browse


[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]

更直接的测试代码就是:
alert(test("身份证号码"));

经测试,上面的JS验证太强大了,输入正确的身份证后,随便改一位都报错!非常实用,以后大家就方便了解用户输入的身份证的正确与否了。
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn