$(function () {

    $('#email').blur(function () {
        //var reg = /^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(.[a-zA-Z0-9_-]+)+$/
        var reg = new RegExp("^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(.[a-zA-Z0-9_-]+)+$");
        var emailValue = $(this).val();
        if (reg.test(emailValue)) {
            var requestData = {email: emailValue}
            if(emailValue=="hwf452@163.com"){
                alert("邮箱已被占用");
            }else{
                alert("注册邮箱可用");
            }

            $.get("https://www.hao123.com", function (data, status) {
                alert("数据: " + data + "\n状态: " + status);
            }, "text");
            $.post("https://www.hao123.com",
                {
                    email: emailValue
                },
                function (data, status) {
                    alert("数据: \n" + data + "\n状态: " + status);
                });
        } else {
            alert("邮箱格式不正确");
        }
    });
})