时间: 2020-11-22|50次围观|0 条评论

 1
$.get("/admin/ashx/wallet.ashx", { "username": username, "t": Math.random() }, function (obj) {},"json")
2
 $.post("/admin/ashx/wallet.ashx", data + "&type=m", function (obj) {},"json")

 

3 传到本页面的

 $.post("/Login/login2.aspx", { "username": txtuser, "userpwd":txtpwd ,"code":code},
        function () {
         
        },"json")

 

在后台

  protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.Headers["X-Requested-With"] != null
 && Request.Headers["X-Requested-With"].ToLower() == "XMLHttpRequest".ToLower())
            {
                if (!string.IsNullOrEmpty(Request.Params["username"])
                    && !string.IsNullOrEmpty(Request.Params["userpwd"])
                    && !string.IsNullOrEmpty(Request.Params["code"]))
                {
                    Login();
                }
            }

        }

        void Login()
        {
            Response.Write("1");
           
        }

 

 

转载于:https://www.cnblogs.com/cdaq/p/3557515.html

原文链接:https://blog.csdn.net/weixin_30342827/article/details/98980117

本站声明:网站内容来源于网络,如有侵权,请联系我们,我们将及时处理。

本博客所有文章如无特别注明均为原创。
复制或转载请以超链接形式注明转自起风了,原文地址《Query 传值的方式
   

还没有人抢沙发呢~