如何找到哪个脚本修改所选属性的CSS [英] How to find which script modifies css of selected attribute

查看:127
本文介绍了如何找到哪个脚本修改所选属性的CSS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法获得脚本修改选择的DOM元素的信息,以及在哪个顺序?

Is there a way to get information which scripts modified selected DOM element, and in which order?

在我的网站上,我修改div A的宽度。然而,一些其他脚本修改宽度之后,但我不知道哪个脚本是。我如何找到它?

On my website, I modify width of div A. It appears however, that some other script modifies that width after that, but I do not know which script it is. How can I find it?

编辑:
更多地搜索之后,我在firebug中找到它,你可以在HTML视图中右击属性,然后选择停止javascript更改(或sth类似,我的firefox不是英语),问题是它重置页面后重置,这使它为我使用。

After searching a bit more, I fount that in firebug you can right click attribute in HTML view, and select "stop javascript on change" (or sth similar, my firefox is not in english), the problem being it resets after reloading the page, what makes it useles for me.

推荐答案

我使用chrome开发工具来调试我的页面。它支持向dom元素添加断点,当dom的属性被javascript修改时,它会立即中断渲染过程。我想你可以试试。

I am using chrome developer tools to debug my page. It supports add breakpoints to dom elements, when attributes of dom is modified by javascript, it breaks the rendering process immediately. I think you can try it.


< img src =https://i.stack.imgur.com/FmyKb.pngalt =输入图片说明here>

这篇关于如何找到哪个脚本修改所选属性的CSS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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