Webbrowser的部分内容

 

getElementById

Debug.Print WebBrowser1.Document.getElementById("DivID").innerHTML
Debug.Print WebBrowser1.Document.getElementById("DivID").innerText
Debug.Print WebBrowser1.Document.getElementById("textareaID").value

获得选中部分的源代码

Dim doc As Object, objhtml As Object
Set doc = WebBrowser1.Document.selection
Set objhtml = doc.createRange()

Debug.Print objhtml.htmlText
【VB】Webbrowser中屏蔽弹出窗口及脚本错误提示

http://kingfzh.blog.163.com/blog/static/3904865820129120817340/

WebBrowser1.Silent = true

谨慎注意WebBrowser控件的DocumentCompleted事件

http://www.csharpwin.com/dotnetspace/1185.shtml
判断页面是否下载完成的方法是综合利用ReadyState。
Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant) 
      If WebBrowser1.ReadyState = 4 Then
 
posted @ 2013-05-09 12:01  忘忧般若汤  阅读(242)  评论(0编辑  收藏  举报