$(document).ready(function () {
        $("#Fnumber").bind("propertychange", function () {
            var a = $("#Fnumber").val();
            alert(a);            $.ajax({
                type: "POST",
                url: "AddStorage.aspx/aa",
                data:"{a}",
                dataType: "text",
                contentType: "application/json; charset=utf-8",
                beforeSend: function (XMLHttpRequest) {
                    $('#show').text("正在查询");
                },
                success: function (msg) {
                    alert("cg");
                },
                error: function (xhr, msg, e) {
                    alert(xhr.status);
                    alert(xhr.readyState);
                    alert(msg);                 }
            });        });
    });为了调试后台代码改成了
   
        [System.Web.Services.WebMethod()]
        public static string aa(string str)
        {
            return str;
        }

解决方案 »

  1.   

    500是编译失败,和你的jquery无关啊
      

  2.   

    AddStorage.aspx/aa这个页面里面有错误
      

  3.   

    是error方法XMLHttpRequest.status的 值 。
      

  4.   

    刚学 jquery不久 没哈经验啊 求助各位了
      

  5.   

    mvc?
     url: "AddStorage.aspx/aa",
      data:"{a}",看是不是data的问题
    data:{
    id:$("#a").val()
    }是mvc 的话
      [HttpPost]
      public string aa(string str)
      {
       return str;
      }
      

  6.   

    普通 的 WEB应用没用MVC不熟  改过也不行 报错
      

  7.   

           context.Response.ContentType = "application/json";
           int count = maxInfo.WaitDealCount();//这里调用业务方法查询
            context.Response.ContentType = "text/plain";
            context.Response.Write(count);