This article describes how to Create ajax objects and make them compatible with multiple browsers. For more information, see
<Script> function createAjax () {var request = false; // XMLHttpRequest in the window object is non-IE, including (IE7 or later) if (window. XMLHttpRequest) {request = new XMLHttpRequest (); if (request. overrideMimeType) {request. overrideMimeType ("text/xml");} // The ActiveXObject attribute in the window object is IE} else if (window. activeXObject) {var versions = ['Microsoft. XMLHTTP ', 'msxml. XMLHTTP ', 'msxml2. XMLHTTP.7.0 ', 'msxml2. XMLHTTP.6.0 ', 'msxml2. XMLHTTP.5.0 ', 'msxml2. XMLHTTP.4.0 ', 'msxml2. XMLHTTP.3.0 ', 'msxml2. XMLHTTP ']; for (var I = 0; I <versions. length; I ++) {try {request = new ActiveXObject (versions [I]); if (request) {return request ;}} catch (e) {request = false ;}}return request;} var ajax = createAjax (); alert (ajax); </script>