邮箱的不为空与格式校验,格式不符合的,重新获取焦点

//邮箱校验
        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; 
        }

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-16
  • 2022-01-07
  • 2021-12-18
  • 2022-01-07
  • 2021-09-23
猜你喜欢
  • 2022-01-07
  • 2021-12-07
  • 2022-01-23
  • 2022-01-07
  • 2021-10-19
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案