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>
  • 相关阅读:
    Messy Code in Windows Server 2008 R2 English Edition
    Office Web Apps Server(1)
    How to add a webpart to your website
    How to Upload multiple files to documentLibrary in one time
    [刘阳Java]_SpringMVC文件上传第1季_第10讲
    [刘阳Java]_SpringMVC访问静态资源_第9讲
    react单组件 渲染页面
    react组件传值传方法
    react组件选项卡demo
    react组件
  • 原文地址:https://www.cnblogs.com/xinlang/p/1340887.html
Copyright © 2011-2022 走看看