zoukankan      html  css  js  c++  java
  • js调用WebService的例子

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Service.aspx.cs" Inherits="Service" %>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
         
    <title>testXML</title>

         
    <script id="clientEventHandlersJS" type="text/javascript">
         
    function getdata()
         
    {
             
    var index=0
             docSubmit 
    =new ActiveXObject("Microsoft.XMLDOM");
             docSubmit.async 
    = false
             docSubmit.load(
    "http://192.168.128.250:1050/smsstatservice/totalstat.asmx/RegUsers"); 
             div1.innerHtml 
    ="";
             div1.innerHTML
    ="注册用户:" docSubmit.xml;
             div1.style.visibility
    ="visible"

             docSubmit.load(
    "http://192.168.128.250:1050/smsstatservice/totalstat.asmx/GetTodaySMS"); 
             div2.innerHtml 
    ="";
             div2.innerHTML
    ="今天发送:" docSubmit.xml;

             docSubmit.load(
    "http://192.168.128.250:1050/smsstatservice/totalstat.asmx/GetThisMonthSMS"); 
             div3.innerHtml 
    ="";
             div3.innerHTML
    ="本月发送:" docSubmit.xml;

             docSubmit.load(
    "http://192.168.128.250:1050/smsstatservice/totalstat.asmx/GetAllSMS"); 
             div4.innerHtml 
    ="";
             div4.innerHTML
    ="共发送:" docSubmit.xml;
         }
     
         
    </script>

         
    <script type="text/javascript">
         setInterval(getdata,
    1000); //动态定时调用,可以实现无刷新的动态提取数据库,动态提醒等功能!
         
    </script>

    </head>
    <body onload="getdata()">
         
    <input type="button" value="Button" onclick="getdata()" /><br />
         
    <span id="div1" class="list"></span>
         
    <br />
         
    <span id="div2" class="list"></span>
         
    <br />
         
    <span id="div3" class="list"></span>
         
    <br />
         
    <span id="div4" class="list"></span>
         
    <br />
    </body>
    </html>

  • 相关阅读:
    @RequestParam,@PathParam,@PathVariable,@QueryParam注解的使用区别
    关于android studio 出现Error:Execution failed for task ':app:preDebugAndroidTestBuild'. 的解决办法
    opencv:轮廓匹配
    opencv:图像轮廓计算
    opencv:图像轮廓发现
    opencv:联通组件扫描
    opencv:自适应阈值
    opencv:全局阈值
    opencv:二值图像的概念
    opencv:边缘提取
  • 原文地址:https://www.cnblogs.com/yvesliao/p/855949.html
Copyright © 2011-2022 走看看