var isIDCardReg15 = /^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$/;//这是验证15位的var isIDCardReg18 = /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}(\d|X|x)$/;//则是验证18位的var isIdCardReg = /(^\d{15}$)|(^\d{17}([0-9]|X)$)/;//这是15位和18位结合起来验证,不是以上两个结合