【问题标题】:How to get the Iframes height in firefox如何在 Firefox 中获取 iframe 高度
【发布时间】:2011-03-22 14:51:46
【问题描述】:

我们如何使用 javascript 从 firefox 的 iframe 中获取 iframe 的高度。

我尝试过使用 window.innerHeight,但返回的是总窗口高度

我需要 iframe 的高度而不是它的父窗口

【问题讨论】:

    标签: javascript firefox iframe


    【解决方案1】:

    您可以通过它的 id 引用 iframe,使用类似:

    document.getElementById('iframeId').innerHeight()
    

    【讨论】:

    • 我们如何从 iframe 中获取 iframe 的 id ?
    猜你喜欢
    • 2014-08-10
    • 2011-04-09
    • 2013-09-16
    • 1970-01-01
    • 1970-01-01
    • 2017-09-15
    • 2012-04-06
    • 2015-05-04
    • 2018-08-08
    相关资源
    最近更新 更多