Ajax 创建 XMLHttpRequest 对象

            var xmlRequest;
            if(window.ActiveXObject){
                /*支持IE浏览器*/
                xmlRequest = new ActiveXObject("Microsoft.XMLHTTP");
            }else if(window.XMLHttpRequest){
                /*支持Firefox, chrome, safari等*/
                xmlRequest = new XMLHttpRequest();
            }

 

posted @ 2012-07-17 19:34  lihui_yy  阅读(269)  评论(0编辑  收藏  举报