六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 35|回复: 0

将某网页的某框架内容显示在WEBBROWSER中

[复制链接]

升级  10.8%

386

主题

386

主题

386

主题

探花

Rank: 6Rank: 6

积分
1216
 楼主| 发表于 2013-2-7 14:40:56 | 显示全部楼层 |阅读模式
'下面代码可以实现将某网页的某框架内容显示在新的WEBBROWSER中.
'add two webbrowser and a commandbutton to form1:
Private Sub Command1_Click()
Dim html As String
html = WebBrowser1.Document.frames(4).Document.body.innerHTML
html = "<HTML>" & "<BODY>" & html & "</BODY>" & "</HTML>"
WebBrowser2.Navigate "about:blank"
WebBrowser2.Document.write html
End Sub
'
Private Sub Form_Load()
WebBrowser1.Navigate "http://community.csdn.net/Expert/topic/4733/4733339.xml", 0
End Sub
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表