【www.gdgbn.com--浏览器】

function $(id)
{
 return xxkf_obj(id);
}
function create_xmlhttp(){
 var obj=false;
 /*@cc_on @*/
 /*@if (@_jscript_version >= 5)
 // jscript gives us conditional compilation, we can cope with old ie versions.
 // and security blocked creation of the objects.
  try {
   obj = new activexobject("msxml2.xmlhttp");
  } catch (e) {
   try {
    obj = new activexobject("microsoft.xmlhttp");
   } catch (e) {
    obj = false;
   }
  }
 @end @*/
 if (!obj && typeof xmlhttprequest!="undefined") {
   try {
     obj = new xmlhttprequest();
   } catch (e) {
     obj=false;
   }
 }
 if (!obj && window.createrequest) {
   try {
     obj = window.createrequest();
   } catch (e) {
     obj=false;
   }
 }
 return obj;
}
function ajax_open_url(url,result_func)
{
 xmlhttp=create_xmlhttp(); 
 xmlhttp.open("get",url,true);
 xmlhttp.onreadystatechange=result_func;
 xmlhttp.send(null);
}

本文来源:http://www.gdgbn.com/bangongshuma/29351/