﻿var xmlhttp;
function createXmlhttp(){
 if(window.XMLHttpRequest){
  xmlhttp = new XMLHttpRequest();
      if (xmlhttp.overrideMimeType){
       xmlhttp.overrideMimeType("text/xml");
      }
 }
 else if(window.ActiveXObject){
  try{
   xmlhttp = new  ActiveXObject("Msxml2.XMLHTTP");
  }catch(e){
   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
 if(!xmlhttp){
  window.alert("不支持XMLHttpRequest!");
 }
 return xmlhttp;
}

