3

I'm working on IE 7 and 8 HTML/CSS fixes, but when I use the Developer Tools and try to look at dynamically loaded HTML you first can't select the newly added elements, but then I read that you should hit the refresh in the toolbar which works. But, when you inspect any of the elements the style information in the style tab doesn't show properly.

All it shows is something like the following: inherited - html inherited - body inerhited - div inerhited - div inerhited - div

You can't expand these to see the actual attributes and values like you would with elements that aren't dynamically loaded.

Is there a workaround for this?

Regards, Jacques

4

3 回答 3

3

有。

这是一个肮脏的解决方法,但应该允许您检查可能已动态添加到 dom 的元素。

请看下面的截图:

选择元素和编辑按钮

如果您无法选择元素(箭头按钮),请单击编辑按钮(使用铅笔),您将进入编辑模式。再次单击编辑退出编辑模式,现在应该可以选择元素。

“编辑模式”

编辑模式

有时进入和退出编辑模式可能会产生副作用,但这种技术适用于大多数情况。

于 2014-01-21T10:32:05.603 回答
0

你试过 FireBug lite 吗?这是一个完全使用 JavaScript 编写的 FireBug 版本,它允许您在 IE 中使用大多数常见的 firebug 功能。它适用于 IE 6 及更高版本。

我过去在 iPad 上调试时成功使用过它,在 iOS 6 之前,无法检查 HTML。它同样适用于 IE。

你可以在这里阅读更多关于它的信息:http: //getfirebug.com/firebuglite

于 2012-10-15T14:57:15.487 回答
0

我自己也遇到过这个问题。

我使用Head.js的扩展版本来加载样式表链接以及脚本文件。我现在有一个需要调查的特定 IE8 样式错误,但动态添加的样式不会出现在开发人员工具中。

要调试它,我想我将不得不暂时静态添加 css 文件。Chrome 和 Firefox 开发工具可以处理这种动态样式。如果我有通用样式问题,那很好,但是当它是特定于 IE 时,我必须跳过一些障碍。

我想不出对此的“解决方案”。不幸的是,我们受制于 IE 开发工具。也许 IE 10 开发工具更好,但我现在使用的是 Windows 7。

于 2012-10-11T11:27:57.457 回答