zoukankan      html  css  js  c++  java
  • ajax 调用 webserver

    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
        <title>ajax webserver</title>
        <script type="text/javascript">
               function GetLogin()
               {
                  var parme = document.getElementById("txtAccount").value;
                  test.login.loginService.GetLogin(parme,Complate,Error);
               }
               function Complate(result)
               {
                    var message = "";
                    if(result ==false)
                    {
                        message = "<font color='blue'>此账号可以注册!</font>";
                    }
                    if(result == true)
                    {
                        message = "<font color='red'>此账号已经存在!</font>";
                        document.getElementById("submit").disabled = true;
                    }
                    document.getElementById("SpShowMessage").innerHTML = message;
                    //alert(result);
               }
               function Error(result)
               {
                    alert(result);
               }
        </script>
    </head>
    <body>
        <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        <Services>
            <asp:ServiceReference Path="~/login/loginService.asmx" />
        </Services>
        </asp:ScriptManager>
        <div>
          用户名:  <input id="txtAccount" type="text" onkeyup="GetLogin();"/><span id="SpShowMessage"></span>
          <p>
          <input type="button" id="submit" runat="server" value="提交"/>
          </p>
        </div>
        </form>
    </body>
    </html>
  • 相关阅读:
    docker for windows 中挂载文件到容器
    docker for windows 中 镜像 microsoft/donet 的文件结构
    window7下docker toolbox 启用数据卷报错: Error response from daemon: invalid mode:
    无法创建虚拟目录
    docker 内时区和宿主机差8个小时,怎么办?
    多线程之同时更改数据问题--启用lock
    Linux shell Bash的基本功能1
    Linux shell 脚本执行方式
    Linux vim编辑器使用技巧
    Linux vim编辑器命令
  • 原文地址:https://www.cnblogs.com/xinlang/p/1340887.html
Copyright © 2011-2022 走看看