function GetXmlHttpObject(){
var xmlHttp = null;
try{
//firefox,opera 8.0+,safri
xmlHttp = new XMLHttpRequest();
}catch (e){
// Internet Explorer IE
try{
xmlHttp new ActiveXObject("Msxml2.XMLHTTP");
}catch (e){
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
}
return xmlHttp;
}JS不同浏览器创建xmlhttprequest对象的方法
最新推荐文章于 2025-02-10 10:41:01 发布

304

被折叠的 条评论
为什么被折叠?



