posts - 66,  comments - 40,  trackbacks - 0
      <secipt language="javascript">
         var http_request = false;
         function send_request(url){  //初始化、指定处理函数,发送请求的函数
            http_request = false;
            if (window.XMLHttpRequest) { //Mozilla
               http_request = new XMLHttpRequest();
               if (http_request.overrideMimeType) {   //设置MiMe类别
                  http_request.overrideMimeType("text/xml");
               }
            }
            else if (window.ActionXObject) {  //IE
               try{
                     http_request = new ActionXObject("Msxml2.XMLHTTP");
               }catch (Exception e) {
                  try{
                     http_request = new ActionXObject("Microsoft.XMLHTTP");
                  }catch (e) {}
               }
         }
         if (!http_request) {
            window.alert("不能创建XML.HttpRequest实例对象");
            return false;
         }
         http_request.onreadystatechange = processRequest;
         http_request.open("GET",url,true);
         http_request.send(null);
         }
    function processsRequest() {
         if(http_request.readState ==4){
            if(http_request.status == 200){
               alart(http_request.responseText);
            }elae{
               alert("您所请求的页面有异常");
            }
         }
     }
</script>
         
posted on 2006-05-15 09:25 happytian 阅读(137) 评论(0)  编辑  收藏

只有注册用户登录后才能发表评论。


网站导航:
 
<2024年11月>
272829303112
3456789
10111213141516
17181920212223
24252627282930
1234567

Welcome here, my friend!

常用链接

留言簿(12)

随笔档案(66)

文章分类

文章档案(63)

web

最新随笔

搜索

  •  

积分与排名

  • 积分 - 88614
  • 排名 - 646

最新评论

阅读排行榜

评论排行榜