ajax的XMLHttpRequest對象初始化

function   createXmlHttpRequest(){    var xmlHttp;    try{    //Firefox, Opera 8.0+, Safari            xmlHttp=new XMLHttpRequest();     }catch (e){            try{    //Internet Explorer                   xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");             }catch (e){                   try{                           xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");                   }catch (e){}            }     }    return xmlHttp;  }
相關文章
相關標籤/搜索