//兼容处理获取ajax对象 var req = ''; if (window.XMLHttpRequest) req = new XMLHttpRequest(); else req = new ActiveXObject("Msxml2.XMLHTTP");
//建立连接 req.open('get', 'demo.php'); //发送请求 req.send();