【问题标题】:How can I see the elements inside iframe documents like Firebug does?如何像 Firebug 那样查看 iframe 文档中的元素?
【发布时间】:2014-03-13 20:51:56
【问题描述】:

我在我的 HTML 文档中使用了<iframe>

当我通过查看源代码选项在浏览器中查看源代码时,我看不到<iframe> 中的元素。但是,当我在 Firebug 中检查源代码时,我可以看到 iframe 中的所有元素。

是否有办法回显整个 HTML 结构,例如 Firebug 通过 JavaScript 将其显示到控制台,例如使用 jQuery?

【问题讨论】:

标签: javascript php jquery firebug


【解决方案1】:

右击<iframe>并选择This Frame > View Frame Source。 (至少在 Firefox 中是这样的。)

【讨论】:

  • 不,我的意思是我想在控制台中打印它,比如 console.log()
【解决方案2】:

您可以使用console.dirxml(window.frames[i].document)i 作为<iframe> 的索引。

塞巴斯蒂安

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-01-15
    • 2011-03-09
    • 2011-09-06
    • 2012-03-19
    • 1970-01-01
    • 2012-11-14
    • 1970-01-01
    • 2010-09-24
    相关资源
    最近更新 更多