急:在asp里面怎么得到一个网址的html代码,比如得到http://www.csdn.net/index.asp的信息

用xml该怎么写!!
谢谢
---------------------------------------------------------------

 1<script>   
 2var oDiv //添加用的节点   
 3var nP //DIV的 padding-left   
 4var xh //xmlhttp   
 5function getXML()   
 6{   
 7oDiv = document.all.m   
 8oDiv.innerHTML = "正在装载栏目数据,请稍侯......."   
 9oDiv.style.display= ""   
10xh = new ActiveXObject("Microsoft.XMLHTTP")   
11xh.onreadystatechange = getReady   
12xh.open("GET",a.value,true)   
13xh.send()   
14}   
15  
16function getReady()   
17{   
18oDiv.innerHTML = xh.statusText   
19if(xh.readyState==4)   
20{   
21if(xh.status==200)   
22{   
23  
24oDiv.innerHTML = "完成"   
25}   
26else   
27{   
28oDiv.innerHTML = "抱歉,装载数据失败。原因:" + xh.statusText   
29}   
30}   
31}   
32</script>

xmlhttp异步的例子:
URL:

1<input name="a" value="http://www.microsoft.com"/>
1<input onclick="getXML()" type="button" value="get HTML"/>
1<input onclick="if(xh &amp;&amp; xh.responseText) oDiv.innerHTML=xh.responseText" type="button" value="output"/>
1<div id="m"></div>
Published At
Categories with Web编程
Tagged with
comments powered by Disqus