中国大陆身份证校验
function checkIDCard(value){//验证中国居民身份证 var _a=/^(\d{6})()?(\d{2})(\d{2})(\d{2})(\d{3})$/;//验证身份证15位 var _b=/^(\d{6})()?(\d{4})(\d{2})(\d{2})(\d{3})([0-9xX])$/;//验证身份证18位 var l=value.length; var re; if (l!=15&&l!=18){ console.log('身份证号码位数不对'); return false; }else if (l==15){ re = new RegExp(_a); }else{ re = new RegExp(_b); }; var idcard_array = new Array(); idcard_array = value.split(""); var options={area:{ 11: "北京", 12: "天津", 13: "河北", 14: "山西",15: "内蒙古", 21: "辽宁", 22: "吉林", 23: "黑龙江", 31: "上海",32: "江苏", 33: "浙江", 34: "安徽", 35: "福建", 36: "江西",37: "山东", 41: "河南", 42: "湖北", 43: "湖南", 44: "广东"