标签:身份证 pre ret check idc class 校验 car color
function checkIDCard(no){ if(!no){ return false; } var baseRegx = /^([1-9]([0-9]{13}([0-9]|X|x))|(([0-9]{17})([0-9]|X|x)))$/; var hkRegx = /^[A-Z]{1,2}[0-9]{6}\(?[0-9A]\)?$/; var twRegx = /^[a-zA-Z][0-9]{9}$/; var mkRegx = /^[1|5|7][0-9]{6}\(?[0-9A-Z]\)?$/; var tbRegx = /^[0-9]{8}$/;//台胞证 return baseRegx.test(no) || hkRegx.test(no) || twRegx.test(no) || tbRegx.test(no) || mkRegx.test(no); }
标签:身份证 pre ret check idc class 校验 car color
原文地址:http://www.cnblogs.com/rubekid/p/6796065.html