//创建xmlhttp函数
function createAjaxObj(){
 var httprequest=false
 if (window.XMLHttpRequest){ // if Mozilla, Safari etc
  httprequest=new XMLHttpRequest()
  if (httprequest.overrideMimeType)
   httprequest.overrideMimeType('text/xml');
 }
 else if (window.ActiveXObject){ // if IE
  try 
  {
   httprequest=new ActiveXObject("Ms"+"xml2."+"XMLHTTP");
  } 
  catch (e)
  {
   try
   {
    httprequest=new ActiveXObject('Micro'+'soft.'+'XMLHTTP');
   }
   catch (e){}
  }
 }
 return httprequest;
}

//利用xmlhttp获取数据函数,两个参数，第一个是处理url,第二个为返回数据
function load_Hits(do_url){
 var xmlhttp = createAjaxObj();
 try
 {

  var params=do_url;  
  
  xmlhttp.abort(); 
  
  xmlhttp.open("get",params,true);
 
  xmlhttp.setRequestHeader("Content-type", "text/html;charset=gbk"); 
  
  xmlhttp.setRequestHeader("If-Modified-Since","0"); 
 
  xmlhttp.setRequestHeader("Content-length", params.length);
  
  xmlhttp.setRequestHeader("Connection", "close");
 
  xmlhttp.onreadystatechange=f //设置f为返回数据处理函数

  xmlhttp.send(null); 
 
 }catch(ex){alert(ex)}
 
 //数据返回处理函数
  function f()
 {
   
   if(xmlhttp.readyState!= 4 || xmlhttp.status!=200 )
    return ;
   var b= xmlhttp.responseText;
   //document.getElementById("hits").innerHTML="";
   //document.getElementById("hits").innerHTML=b;
   
 }
}