function ischeck(){
var postcode = document.getElementById("postcode").value;
if (postcode != "") { //邮政编码判断
var pattern = /^[0-9]{6}$/;
flag = pattern.test(postcode);
if (!flag) {
alert("非法的邮政编码!")
document.getElementById("postcode").focus();
return false;
}
}
}
阅读(4847) | 评论(0) | 转发(0) |