<mce:script type="text/javascript" language="javascript"><!-- //申明对象实例 var xmlhttp = false; function getHTTPRequestObject() { try { // try legacy object first xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try { // try IE implementation now xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch(E) { xmlhttp = false; } } if(!xmlhttp && typeof XMLHttpRequest!= 'undefined') { // we must be using a mozilla based browser // so create a native request object now xmlhttp = new XMLHttpRequest(); } } //获得一个XMLHttpRequest对象实例 getHTTPRequestObject(); if(xmlhttp) { //异步调用 xmlhttp.open("GET", "http://www.baidu.com", true); xmlhttp.onreadystatechange = function() { if(xmlhttp.readyState == 4) { //引用返回结果 alert(xmlhttp.responseText); } } xmlhttp.send(null); } // --></mce:script>