用
xmlhttp和ADODB.oStream可以很方便地得到一个Url地址的源代码。而且效率高。
<script>
var o<a href="http://dev.21tx.com/web/
xml/" target="_blank">
xml</a>Http = new ActiveXObject("Microsoft.
xmlhttp");
o
xmlhttp.open("GET","http://dotnet.<a href="http://dev.21tx.com/web/asp/" target="_blank">ASP</a>x.cc/content.aspx", false);
o
xmlhttp.send()
var oStream = new ActiveXObject("ADODB.Stream");
if(oStream == null)
alert("您的机器不支持ADODB.Stream.")
else
{
oStream.Type=1;
oStream.Mode=3;
oStream.Open() ;
oStream.Write(o
xmlhttp.responseBody);
oStream.Position= 0;
oStream.Type= 2;
oStream.Charset="gb2312";
var result= oStream.ReadText();
oStream.Close();
oStream = null;
alert( result);
}
</script>