xmlHTTP无刷新
===============================
<html>
 <body>
  <SCRIPT>
  
  setInterval("GetInfo()",6000);
  function GetInfo(){

var xh=new ActiveXObject("Microsoft.XMLHTTP")
 xh.open("get","http://www.iwebsms.com/now.aspx",false)
 xh.send()
 ms.innerHTML=xh.responseText

}
</SCRIPT>

  <div id="ms"></div>
 
 </body>
</html>


webservice无刷新
===============================
<html>
 <body>
  <SCRIPT>setInterval("GetInfo()",6000);function GetInfo(){
document.all.iwebsms.useService("http://iwebsms.com/Service/ServiceWeb.asmx?WSDL","com");
document.all.iwebsms.com.callService(SetList,"GetInfo","4");}

function SetList(result){document.all.DivList.innerHTML =result.value;}</SCRIPT>

  <div id="DivList"></div>
  <div id="iwebsms" style="BEHAVIOR: url(http://iwebsms.com/Service/webservice.htc)"></div>
 </body>
</html>

posted on 2005-02-20 20:19  dahai.net  阅读(369)  评论(0编辑  收藏  举报