浮云间
				12345678910111213141516171819202122232425 var Email = $("#mail").val();  //ajax开始                    $.ajax({                        type: "Post",//请求形式                        url: "Ajax/LoginRegister.ashx",//处理文件路径                        data: {                            op: "2",//判断调用处理文件中的那个方法                            Email : Email //需要传递的参数                        },                        cache: false,                        async: false,//是否异步                        dataType: "html",//返回的数据类型                         success: function (data) {                            if (data > 1) {                                $("#spIsEmail").html("* 该邮箱已被注册!");                                return false;                            }                            else {                                $("#spIsEmail").html("√");                            }                        },                        error: function () {                            alert('数据繁忙,请稍后!');                        }                    })//end ajaxdata中参数 op补充一个处理文件中可以写多个方法,为了有效的识别调取那个方法就衍生了op这个参数。需要在处理文件中做以下处理public void ProcessRequest(HttpContext context)    {        context.Response.ContentType = "text/plain";        string operate =  Request.QueryString["op"];//取出参数          string returnString = "";   //返回的字符串        switch (operate)        {            case "0":                returnString = CheckEmailIsOk(); // 验证邮箱与用户是否匹配                break;            case "1":                returnString = 方法名称(); //第二个方法                break;            case "2":               returnString = 方法名称); // 第三个方法                break;        }        context.Response.Write(returnString);        context.Response.End();    }