随笔 - 100  文章 - 50  trackbacks - 0
<2024年4月>
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011

常用链接

留言簿(3)

随笔分类

随笔档案

文章分类

文章档案

收藏夹

我收藏的一些文章!

搜索

  •  

最新评论

阅读排行榜

评论排行榜

1.创建XMLHttpRequest对象,
 function readyAJAX(){
   try{
      return new XMLHttpRequest();
   }catch(e){
        try{
         return new ActiveXObject("Msxml2.XMLHTTP");
        }catch(e){
              try{
                return new ActiveXObject("Microsoft.XMLHTTP");
              }catch(e){
                  return " A newer browser is needed";
               }
         }  
     }
 }
---------------------------------------------------------------------------------
2. 处理AJAX
requestObj.onreadystatechange = function() {
  if(requestObj.readyState == 4){
    if(requestObj.status == 200){
       alert(requestObj.responseText);
     } else{
       alert(requestObj.statusText);
     }
  }
}
posted on 2011-07-06 22:53 fly 阅读(158) 评论(0)  编辑  收藏 所属分类: JavaScript学习

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


网站导航: