如何在BHO的html页面中获取帧数据

如何在BHO的html页面中获取帧数据

本文介绍了如何在BHO的html页面中获取帧数据(DOM)。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我正在使用Internet Explorer添加。我在DocumentComplete事件发生时操纵DOM。整个数据被操纵但当页面包含帧时,帧中的数据通过AJAX异步更改。所以DocumentComplete事件没有出现。我已经尝试过onreadystatechange事件,downloadbegin事件,下载完成事件等等,但是当帧被刷新时也不会调用这些事件。

那我怎样才能获得完整的DOM当帧被刷新时。我试过以下结果。



I am working on internet explorer add on.I am manipulating DOM when DocumentComplete event was arises.Whole data get manipulated but when page contains frames,the data in frames get asynchronously changed through AJAX.So DocumentComplete event is not arises.I have tried on onreadystatechange event,downloadbegin event,download complete event...etc but these events are also not called when frames get refreshed.
So how can i get complete DOM when frames getting refreshed.I have tried following results.

<br />
webBrowser = (WebBrowser)site;<br />
webBrowser.NavigateComplete2 += new DWebBrowserEvents2_NavigateComplete2EventHandler(this.NavigateComplete2);<br />
webBrowser.BeforeNavigate2+=new DWebBrowserEvents2_BeforeNavigate2EventHandler(this.OnBeforeNavigate2);<br />
               webBrowser.DocumentComplete += new DWebBrowserEvents2_DocumentCompleteEventHandler(this.OnDocumentComplete);<br />
webBrowser.NewWindow2 += new DWebBrowserEvents2_NewWindow2EventHandler(this.NewWindowOpen);<br />
               webBrowser.CommandStateChange += new DWebBrowserEvents2_CommandStateChangeEventHandler(this.commandChange);<br />
               webBrowser.ProgressChange += new DWebBrowserEvents2_ProgressChangeEventHandler(this.progresschange);<br />
               webBrowser.DownloadBegin += new DWebBrowserEvents2_DownloadBeginEventHandler(webBrowser_DownloadBegin);<br />
webBrowser.DownloadComplete += new DWebBrowserEvents2_DownloadCompleteEventHandler(this.OnDownloadComplete);<code>

推荐答案

这篇关于如何在BHO的html页面中获取帧数据(DOM)。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-06 14:08