if(window.ActiveXObject && !window.XMLHttpRequest) { window.XMLHttpRequest = function() { var msxmls=['MSXML3','MSXML2','Microsoft'], ex; for(var i=0;i<msxmls.length;i++) try{return new ActiveXObject(msxmls[i]+'.XMLHTTP')} catch(ex){} throw new Error("No XML component installed!"); } } function a1(){} function a2() { var mm = new XMLHttpRequest() mm.open("GET", url, false"); mm.send(null); }<input type=button onclick="a1(); a2()" />
{
window.XMLHttpRequest = function()
{
var msxmls=['MSXML3','MSXML2','Microsoft'], ex;
for(var i=0;i<msxmls.length;i++)
try{return new ActiveXObject(msxmls[i]+'.XMLHTTP')} catch(ex){}
throw new Error("No XML component installed!");
}
}
function a1(){}
function a2()
{
var mm = new XMLHttpRequest()
mm.open("GET", url, false");
mm.send(null);
}<input type=button onclick="a1(); a2()" />