<script src='https://cdn.jsdelivr.net/gh/mc-zone/IDValidator/IDValidator.min.js'></script>
<script src='https://cdn.jsdelivr.net/gh/mc-zone/IDValidator/GB2260.min.js'></script>

<h1>请打开控制台查看</h1>
// https://github.com/mc-zone/IDValidator
var id = "123456789012345678"; // 清输入身份证号
var Validator = new IDValidator( GB2260 );
Validator.isValid( id );
//合法号码return true, 不合法return false

console.log(Validator.isValid( id, 18 ))
console.log(Validator.getInfo( id ))

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.