function check(){
if (document.form1.hy_mobile.value == ""){
layer.open({
content: '手机号码必须正确输入'
,skin: 'msg'
,time: 2 //2秒后自动关闭
});
document.form1.hy_mobile.focus();
return (false);//停止往下运行
};
var hy_mobile = document.form1.hy_mobile.value
if(!(/^1[3|4|5|6|7|8|9][0-9]\d{4,8}$/.test(hy_mobile))){
layer.open({
content: '手机号码格式不正确'
,skin: 'msg'
,time: 2 //2秒后自动关闭
});
document.form1.hy_mobile.focus();
return false;
};
if (document.form1.hy_mobile.value.length<11){
layer.open({
content: '手机号码不足11位'
,skin: 'msg'
,time: 2 //2秒后自动关闭
});
document.form1.hy_mobile.focus();
return (false);
};
if (document.form1.hy_name.value == "")
{
layer.open({
content: '姓名必须输入'
,skin: 'msg'
,time: 2 //2秒后自动关闭
});
document.form1.hy_name.focus();
return (false);
};
if (document.form1.hy_add.value == "0")
{
layer.open({
content: '地区必须选择'
,skin: 'msg'
,time: 2 //2秒后自动关闭
});
return (false);
};
};