Created
April 23, 2014 07:13
-
-
Save 0xBADC0FFEE/11205349 to your computer and use it in GitHub Desktop.
http://xmlhttprequest.ru/ var xhr = getXmlHttp();
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getXmlHttp(){ | |
var xmlhttp; | |
try { | |
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); | |
} catch (e) { | |
try { | |
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); | |
} catch (E) { | |
xmlhttp = false; | |
} | |
} | |
if (!xmlhttp && typeof XMLHttpRequest!='undefined') { | |
xmlhttp = new XMLHttpRequest(); | |
} | |
return xmlhttp; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment