Skip to content

Instantly share code, notes, and snippets.

@0xBADC0FFEE
Created April 23, 2014 07:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 0xBADC0FFEE/11205349 to your computer and use it in GitHub Desktop.
Save 0xBADC0FFEE/11205349 to your computer and use it in GitHub Desktop.
http://xmlhttprequest.ru/ var xhr = getXmlHttp();
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