zoukankan      html  css  js  c++  java
  • Query 传值的方式

     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");
               
            }

  • 相关阅读:
    js里面的 InttoStr 和 StrtoInt
    预编译知识 (转载记录)
    C语言操作内存
    C语言操作文件
    C语言
    如何调试shell脚本
    设计模式-装饰者模式
    自己动手制作一个模版解析
    设计模式-单例模式
    http中关于缓存的那些header信息
  • 原文地址:https://www.cnblogs.com/cdaq/p/3557515.html
Copyright © 2011-2022 走看看