<script>
function createXMLHttpRequest(http) {
if(window.ActiveXObject) {
eval(http+" = new ActiveXObject(\"Microsoft.XMLHTTP\")");
}
else if(window.XMLHttpRequest) {
eval(http+" = new XMLHttpRequest()");
}
}
//发送html请求,返回内容 参考文章:http://blog.youkuaiyun.com/morethinkmoretry/article/details/5791258
function xGetHtml(aUrl)
{
createXMLHttpRequest("cHttp");
cHttp.open("post", aUrl, false);//第三个参数代表是异步操作 还是同步操作,如果是false=同步
cHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
cHttp.send(null);
var html = cHttp.responseText;
cHttp = null;
return trim(html);
}
</script>
function createXMLHttpRequest(http) {
if(window.ActiveXObject) {
eval(http+" = new ActiveXObject(\"Microsoft.XMLHTTP\")");
}
else if(window.XMLHttpRequest) {
eval(http+" = new XMLHttpRequest()");
}
}
//发送html请求,返回内容 参考文章:http://blog.youkuaiyun.com/morethinkmoretry/article/details/5791258
function xGetHtml(aUrl)
{
createXMLHttpRequest("cHttp");
cHttp.open("post", aUrl, false);//第三个参数代表是异步操作 还是同步操作,如果是false=同步
cHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
cHttp.send(null);
var html = cHttp.responseText;
cHttp = null;
return trim(html);
}
</script>