时间:2021-07-01 10:21:17 帮助过:3人阅读
function create_obj() { var xmlHttp; if (window.XMLHttpRequest) xmlHttp = new XMLHttpRequest(); else if (window.ActiveXObject) xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); return xmlHttp; }
------解决方案--------------------
创建xmlHttp 对象有问题吧。 你那种是ie下的。非ie下的没加进去。改为下面这样试试:
xmlHttp=window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP");
------解决方案--------------------