在SCRIPTS运行后修改DOM [英] Modifying DOM after SCRIPTS run

查看:114
本文介绍了在SCRIPTS运行后修改DOM的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好。我目前正在构建一个BHO,旨在在页面加载后修改页面DOM。 DOM修改在 DISPID_DOCUMENTCOMPLETE 处理程序中执行。但是,一些 SCRIPTS 在触发 DISPID_DOCUMENTCOMPLETE 事件后运行,该事件会修改页面结构。



有没有办法让我修改DOM AFTER 一切都已加载并运行,包括脚本



我尝试了很多活动但是,它们都表现得一样:

DISPID_DOCUMENTCOMPLETE

DISPID_NAVIGATECOMPLETE2



提前致谢!

Hello everyone. I am currently building a BHO which aims at modifying the page DOM after the page is loaded. The DOM modification is performed within the DISPID_DOCUMENTCOMPLETE handler. However, some SCRIPTS run after the DISPID_DOCUMENTCOMPLETE event is triggered which modify the structure of the page.

Is there a way for me to modify the DOM AFTER everything has been loaded and run including the SCRIPTS?

I''ve tried a number of events but, they all behave the same way:
DISPID_DOCUMENTCOMPLETE
DISPID_NAVIGATECOMPLETE2

Thanks in advance!

推荐答案

最好在加载前修改内容。

另外,您可以使用修改后的DOM完全重新加载网站。
At best you modify the content before it is loaded.
Alternative you can completly reload the site with the modified DOM.


这篇关于在SCRIPTS运行后修改DOM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆