【问题标题】:Is there a way to get document and window properties in chrome有没有办法在 chrome 中获取文档和窗口属性
【发布时间】:2012-12-13 05:44:19
【问题描述】:

有没有办法在 chrome 开发者工具箱中获取文档和窗口属性?

我在开发人员工具箱的元素选项卡中没有看到它。这在排除 jquery.offset 问题时非常方便

我们不妨在 Firefox 4+ 中讨论这个问题

谢谢

【问题讨论】:

    标签: google-chrome google-chrome-devtools


    【解决方案1】:

    尝试在控制台中输入:

    console.dir(window) //just "window" would work too
    console.dir(document)
    

    【讨论】:

      【解决方案2】:

      您实际上可以在 devtools 控制台中输入(Windows 上的 F12 或 Mac 上的 Cmd+Alt+):

      window // logs the window object
      document // logs the document object
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2021-02-18
        • 1970-01-01
        • 2019-09-12
        • 2011-03-03
        • 2010-11-23
        • 2014-07-14
        • 2020-05-01
        • 2021-01-20
        相关资源
        最近更新 更多