兼容360极速模式有关问题
请教高手 兼容360极速模式问题
var xmlhttp;
// 创建XMLHTTPRequest对象
function createXMLHTTPRequest()
{
if(window.ActiveXObject) //如果当前浏览器为IE
{
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
else if(window.XMLHTTPRequest) /如果是其他浏览器
{
xmlhttp = new XMLHTTPRequest();
}
}
请教高手,能兼容360极速模式如何写?
------解决思路----------------------
new ActiveXObject('Msxml2.XMLHTTP');试试
------解决思路----------------------
var xmlhttp;
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
http://www.w3school.com.cn/ajax/ajax_xmlhttprequest_create.asp
var xmlhttp;
// 创建XMLHTTPRequest对象
function createXMLHTTPRequest()
{
if(window.ActiveXObject) //如果当前浏览器为IE
{
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
else if(window.XMLHTTPRequest) /如果是其他浏览器
{
xmlhttp = new XMLHTTPRequest();
}
}
请教高手,能兼容360极速模式如何写?
------解决思路----------------------
new ActiveXObject('Msxml2.XMLHTTP');试试
------解决思路----------------------
var xmlhttp;
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
http://www.w3school.com.cn/ajax/ajax_xmlhttprequest_create.asp