<script type="text/javascript">
function checkForm(){
var room_id = $('#room_id').val();
var tel = $('#user_tel').val();
alert('请选择包房');
return false;
}
if (tel =='' || !reg.exec(tel)){
alert('手机号为空或手机号格式不符!');
return false;
}
return true;
}
</script>
function checkForm(){
var room_id = $('#room_id').val();
var tel = $('#user_tel').val();
var reg =/^1[345678]\d{9}$/;
var regEmail = /^([a-zA-Z0-9_.-]+)@([da-z.-]+).([a-z.]{2,6})$/; // 邮箱正则
if(room_id == ""){alert('请选择包房');
return false;
}
if (tel =='' || !reg.exec(tel)){
alert('手机号为空或手机号格式不符!');
return false;
}
return true;
}
</script>