All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
Asp.net编程中的数组基础实例学习_.net资料_编程技术
使用ASP.NET,2.0,GridView轻松操作数据_[Asp.Net教程]
从草根到大腕,PHP技术发展历程_php资料_编程技术
ASP.NET,2.0,中使用自定义缓存依赖_[Asp.Net教程]
利用C#实现分布式数据库查询_[Asp.Net教程]
SQL数据库高级教程:学习 SQL AND & OR_[SQL Server教程]
10个提升ASP.NET程序性能的简单做法_[Asp.Net教程]
TreeView服务器控件的功能和属性
用em指定字体尺寸的问题和解决办法_[Html教程]
ASP.NET,2.0服务器控件之复合控件样式_[Asp.Net教程]
Reading number is top 10 pictures
来几张有特色的图片
Small QiShu -- ShuangShuangPan1
NeedWallpaper6
Ashlynn Brooke a group sexy photo2
青春清纯美女大集合2
Kim jong il's mistress, national beauty JinYuJi actor3
超强高考作文
Catch prostitution woman in China
NeedWallpaper10
人造器官和铁肺人
Download software ranking
VC++6.0简体中文版
Unix video tutorial8
Boxer's Top ten classic battle10
Unix video tutorial13
Unix video tutorial6
功夫熊猫2(上集)
Unix video tutorial20
Boxer's Top ten classic battle1
虚拟机汉化软件
Visual C++界面编程技术
delv published in(发表于) 2013/12/31 6:40:02 Edit(编辑)
利用XMLHTTP从其他页面获取网页数据_JavaScript技术_编程技术

利用XMLHTTP从其他页面获取网页数据_JavaScript技术_编程技术

利用XMLHTTP从其他页面获取网页数据_JavaScript技术_编程技术-你的首页-uuhomepage.com
我们在编写ASP代码的时候,大家都知道可以通过post或者get获得form表单的数据,那么我们如何直接获得其他页面上的数据呢?这就要借助xmlhttp协议了。xmlhttp是xmldom技术的一部分。

下面的代码就是一个很简单的例子,我们利用xmlhttp技术,把http://www.codetoad.com/站点首页的代码以xml的形式完全获取,并且在页面中输出。


<%
Dim objXMLHTTP, xml
Set xml = Server.CreateObject("Microsoft.XMLHTTP")

xml.Open "GET", "http://www.codetoad.com/", False
' Pull the data from the web page
xml.Send
Response.write "Here's the html we now have in our xml object"
Response.write "


"
Response.Write "" <BR> Response.Write xml.responseText <BR> Response.Write ""
Response.write "


"
Response.write " Now here's how the page looks:

"
Response.Write xml.responseText

Set xml = Nothing
%>

下面是另一个实例
<%
dim objHTTP , objXML , objXSL
set objHTTP = Server.CreateObject("Microsoft.XMLHTTP")
objHTTP.open "GET", "http://p.moreover.com/cgi-local/page?c=Pop%20music%20reviews&o=xml", false
objHTTP.send
set objXML = objHTTP.responseXML
set objXSL=Server.CreateObject("microsoft.xmldom")
objXSL.async=false
objXSL.load(Server.MapPath("style.xsl"))
if (objXSL.parseError.errorCode = 0) then
Response.Write(objXML.transformnode(objXSL))
else
Response.Write "Error: " & objXSL.parseError.reason & " URL:" & objXSL.url
end if
Set objHTTP = Nothing
Set objXML = Nothing
Set objXSL = Nothing
%>
style.xsl:




moreover...














_blank






_blank






_blank


GMT









添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.