+ -
当前位置:首页 → 问答吧 → 为什么通过 Msxml2.XMLHTTP.4.0 不能创建 xmlhttp 对象呢?

为什么通过 Msxml2.XMLHTTP.4.0 不能创建 xmlhttp 对象呢?

时间:2010-12-05

来源:互联网

我发现唯独不能通过 Msxml2.XMLHTTP.4.0 创建xmlhttp对象。这是怎么回事呢?
JScript code

var msXmlhttp = new Array("Msxml2.XMLHTTP.5.0","Msxml2.XMLHTTP.4.0","Msxml2.XMLHTTP.3.0","Msxml2.XMLHTTP","Microsoft.XMLHTTP");
for(var i=0; i<msXmlhttp.length; i++){
try
{
_xmlhttp=new ActiveXObject(msXmlhttp[i]);
if(_xmlhttp) {alert(msXmlhttp[i]);}  //Msxml2.XMLHTTP.4.0 创建不了
}
catch(e)
{
_xmlhttp=null;
}
}

作者: helloword222   发布时间: 2010-12-05

换个电脑试试,可能MSXML4.0少了
或者把你的那个e的信息alert出来,看结果

作者: xjfhnsd   发布时间: 2010-12-06

热门下载

更多