在使用ajax的时候,我们无法跨域获取不属于自己的服务器的数据,故引出了这么一种方法来辗转获取:
1、向本域中的网页请求数据,包含一个网址信息
2、被请求的本域的网页中的asp代码向跨域的服务器请求数据,然后返回给本域中的asp文件
代码:
Function getHtml(url) ‘以HTML格式备份
	Set xh = CreateObject("Microsoft.XMLHTTP")
	xh.Open "GET",url,0
	xh.Send()
	Set MyStream=CreateObject("Adodb.Stream") 
	MyStream.Type = 2
	MyStream.Open 
	MyStream.WriteText xh.responseText
	MyStream.Position = 0
	getHtml=MyStream.ReadText
	MyStream.Close
End Function
有问题欢迎提问
原文:http://blog.csdn.net/greatbody/article/details/18931743