客户端的方式获取某个页面的代码
<script>
var oXmlHttp = new ActiveXObject("Microsoft.XmlHTTP");
oXmlHttp.open("GET","http://www.baidu.com", false);
oXmlHttp.send()
var oStream = new ActiveXObject("ADODB.Stream");
if(oStream == null)
alert("您的机器不支持ADODB.Stream.")
else
{
oStream.Type=1;
oStream.Mode=3;
oStream.Open() ;
oStream.Write(oXmlHttp.responseBody);
oStream.Position= 0;
oStream.Type= 2;
oStream.Charset="gb2312";
var result= oStream.ReadText();
oStream.Close();
oStream = null;
var aa = window.open("","")
document.write(result);
aa.document.write(result);
}
</script>