邮箱的不为空与格式校验,格式不符合的,重新获取焦点
//邮箱校验 var buttemail = $("#buttemail").val(); if(buttemail == null || buttemail == undefined || buttemail == "") { alert("对接人Email不能为空"); $("#buttemail").focus(); return false; } //邮箱格式的判断 if(!buttemail.match(/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((\.[a-zA-Z0-9_-]{2,3}){1,2})$/)) { alert("对接人Email格式错误!"); $("#buttemail").focus(); return false; }