id为input的id
// 判断身份证是否正确
$('#iscard').blur(function() {
var card = $.trim($("#iscard").val());
if(card.match(/^(\d{15}$|^\d{18}$|^\d{17}(\d|X|x))$/) == null) {
alert('身份证号格式错误');
return;
}
});
转载于:https://www.cnblogs.com/yongwang/p/6950918.html
id为input的id
// 判断身份证是否正确
$('#iscard').blur(function() {
var card = $.trim($("#iscard").val());
if(card.match(/^(\d{15}$|^\d{18}$|^\d{17}(\d|X|x))$/) == null) {
alert('身份证号格式错误');
return;
}
});
转载于:https://www.cnblogs.com/yongwang/p/6950918.html