如何获得WebBrowser控件显示网页的html源码?

microchu 2002-09-18 01:32:06
我用VB做了一个简单的浏览器(模板窗体),想在另外一个窗体中的RTF控件上显示该页的源码,请问给如何做才能得到源码?
...全文
34 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
tower6 2002-11-08
  • 打赏
  • 举报
回复
效果不好,不如用
Text1.text=Inet1.openURL("...")
antshome 2002-09-18
  • 打赏
  • 举报
回复
给分吧,我快长星星了
antshome 2002-09-18
  • 打赏
  • 举报
回复
Text1.Text = WebBrowser1.Document.body.innerHTML
microchu 2002-09-18
  • 打赏
  • 举报
回复
你用过吗?object.Document 得到的只有"[object]"
antshome 2002-09-18
  • 打赏
  • 举报
回复
Document 属性
--------------------------------------------------------------------------------

Description

Returns the automation object of the active document, if any. This provides access to the contents of the HTML document through the object model. For more information, see the document object section in the Dynamic HTML reference.


Syntax
object.Document



Part Description
object Required. An object expression that evaluates to an object in the Applies To list.


Applies To

InternetExplorer, WebBrowser


See Also
Container



--------------------------------------------------------------------------------

Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.

1,451

社区成员

发帖
与我相关
我的任务
社区描述
VB 控件
社区管理员
  • 控件
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧