请问个的问题,谢谢!

ziyantan 2004-12-04 04:55:31
怎样才能得到WebBrowser里的代码
并在下载事件里判定Window.open 和 target=_blank的存在?而做出象MYIE那样的功能?
...全文
44 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
ziyantan 2004-12-04
  • 打赏
  • 举报
回复
if not webbrowser1.busy then
set doc=webbrowser1.document
i=0
set objhtml=doc.body.createtextrange()
if not isnull(objhtml) then
text1.text=objhtml.htmltext
end if

接着用Instr 判定?
有更好方法吗?
daisy8675 2004-12-04
  • 打赏
  • 举报
回复
mark
aohan 2004-12-04
  • 打赏
  • 举报
回复
Private Sub Command1_Click()
If Text1.Text <> "" Then
WebBrowser1.Navigate2 Text1.Text
WebBrowser1.Visible = True
Text2.Visible = False
End If
End Sub

Private Sub Command2_Click()
Text2.Visible = True
Text2.Text = Inet1.OpenURL(Text1.Text)
WebBrowser1.Visible = False
End Sub

Private Sub Command3_Click()
End
End Sub

7,759

社区成员

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

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