var xmlHttp;
function createXmlHttpRequest()
{
if(window.XMLHttpRequest)
{
xmlHttp=new XMLHttpRequest();
if(xmlHttp.overrideMimeType)
{
xmlHttp.overrideMimeType("text/xml");
}
}
else if(window.ActiveXObject)
{
try
{
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
}
catch(e)
{
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
}
if(!xmlHttp)
{
window.alert("你的浏览器不支持创建XMLhttpRequest对象");
}
return xmlHttp;
}
javascript创建createXmlHttpRequest对象
最新推荐文章于 2021-03-11 20:19:52 发布