var xhr = null; if(window.XMLHttpRequest){ xhr = new XMLHttpRequest();//常用的浏览器 }else{ xhr= new ActiveXobject("Microsoft.XMLHttp");//IE6 } xhr.open("get","url"); xhr.send();