Webbrowser控件史上最强技巧全集

loading 分享 2026-7-17 下载文档

Dim obj As HTMLDocument Set obj = pDisp.Document obj.parentWindow.execScript End Sub

而confirm引发的对话确定框可用confirm替换showModalDialog即可,Alert等同理~

WebBrowser取得网页源码Private Sub Command1_Click() WebBrowser1.Navigate \End Sub

Private Sub WebBrowser1_DownloadComplete() '页面下载完毕 Dim doc, objhtml

Set doc = WebBrowser1.Document

Set objhtml = doc.body.createtextrange() If Not IsNull(objhtml) Then Text1.Text = objhtml.htmltext End If

End Sub

我用WebBrowser取得网页源码,直接运行正常,但在编译后出错

提示:实时错误“91” Object 变量或 with 块变量没有设置 可能是没有下载完所致,

Private Sub WebBrowser1_DownloadComplete() if webbrowser.busy=false then Dim doc, objhtml

Set doc = WebBrowser1.Document

Set objhtml = doc.body.createtextrange() If Not IsNull(objhtml) Then Text1.Text = objhtml.htmltext End If end if End Sub

\

showModalDialog(){return;}\

'

showModalDialog引起的对话框进行确定


Webbrowser控件史上最强技巧全集.doc 将本文的Word文档下载到电脑
搜索更多关于: Webbrowser控件史上最强技巧全集 的文档
相关推荐
相关阅读