【难题】如何引用其他网站asp页面的部分html代码,要求跟随更新

比如其他网站的新闻,但是不能链接它的数据库,如何在自己的页面上显示一样的新闻,它的新闻更新了,自己的页面也更新了,急
---------------------------------------------------------------

 1<iframe src="http://news.sohu.com">   
 2\---------------------------------------------------------------   
 3  
 4搜索“XMLHTTP”   
 5\---------------------------------------------------------------   
 6  
 7做个frame,把它的页包含近来就是了。   
 8\---------------------------------------------------------------   
 9  
10给你一个参考的网站,这个网站完全是你的想法!   
11  
12http://www.skyhits.com   
13\---------------------------------------------------------------   
14  
15[读取远端网页,并显示出来]   
16<script language="vbscript">   
17Function bytes2BSTR(vIn)   
18Dim strReturn,i,ThisCharCode,innerCode,Hight8,Low8,NextCharCode   
19strReturn = ""   
20For i = 1 To LenB(vIn)   
21ThisCharCode = AscB(MidB(vIn,i,1))   
22If ThisCharCode < &H80 Then   
23strReturn = strReturn & Chr(ThisCharCode)   
24Else   
25NextCharCode = AscB(MidB(vIn,i+1,1))   
26strReturn = strReturn & Chr(CLng(ThisCharCode) * &H100 + CInt(NextCharCode))   
27i = i + 1   
28End If   
29Next   
30bytes2BSTR = strReturn   
31End Function   
32</script>
33<script language="javascript">   
34var xmlhttp=new ActiveXObject("Msxml2.xmlhttp")   
35xmlhttp.open("GET","http://127.0.0.1/houseinfo/letinfo.asp",false)   
36xmlhttp.send()   
37document.write(bytes2BSTR(xmlhttp.ResponseBody))   
38</script></iframe>
Published At
Categories with Web编程
Tagged with
comments powered by Disqus