标签:use UNC amp str bsp turn user return name
function regular(){
var name=$("#user_name").val();
var phone=$("#phone").val();
var identify=$("#identify").val();
var area=$("#area").val();
var name_regular=/[\u4e00-\u9fa5]{2,7}]/; //姓名正则
var regular=/ \d{17}[\d[x] | \d{15} /; //
var regular=/0\d{2,3}-\d{7,8}/
var phone_regular=/0?(13 | 14 | 15| 18| 19) [0-9]{9})/ //电话正则
var area_regular=/^ (\d+\.\d{1,4} | \d+) $/ //土地面积正则
if(name.length>0&&!name_regular.test(name)){
alert("姓名格式不正确");
return;
}
if(phone.length>0&&!name_regular.test(phone)){
alert("电话格式不正确");
return;
}
}
标签:use UNC amp str bsp turn user return name
原文地址:https://www.cnblogs.com/binghuaZhang/p/11279680.html