function isphone(){
var rt = new array();
rt[0] = "^((\(\d{2,3}\))|(\d{3}\-))?(\(0\d{2,3}\)|0\d{2,3}-)?[1-9]\d{6,7}(\-\d{1,4})?$";
rt[1] = "应输入正确的电话号码格式!";
return rt;
}function ismobile(){
var rt = new array();
rt[0] = "^((\(\d{2,3}\))|(\d{3}\-))?(13|15)\d{9}$";
rt[1] = "应输入正确的手机号码格式!";
return rt;
}function isurl(){
var rt = new array();
rt[0] = "^http[s]?://[a-za-z0-9]+.[a-za-z0-9]+[/=\?%\-&_~`@[\]\':+!]*([^<>""])*$";
rt[1] = "应输入正确的url(必须以http(s)://开头)!";
return rt;
}function iszip(){
var rt = new array();
rt[0] = "^[1-9]\d{5}$";
rt[1] = "应输入正确的编码格式!";
return rt;
}
</script>
时间: 2024-10-23 08:05:35