• 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>
  • 相关阅读:
    wifi详解(四)
    wifi详解(三)
    wifi详解(二)
    wifi详解(一)
    Linux下GPIO驱动
    wpa_cli调试工具的使用
    WAPI
    java spring使用Jackson过滤
    JPA 一对多双向映射 结果对象相互迭代 造成堆栈溢出问题方法
    Javassist指引(二)--ClassPool
  • 原文地址:https://www.cnblogs.com/xinlang/p/1340887.html
Copyright © 2020-2023  润新知