我正在尝试获取 <iframe>d 文档的高度。我的第一直觉是:
$('iframe').document.height();
或
$('iframe').contentWindow.document.height();
那些都不管用,而且我的搜索运气也不佳。如果有任何帮助,我将不胜感激!
最佳答案
$("iframe",top.document).contents().height();
alert("iframe height=" + $("iframe",top.document).height());
关于javascript - 如何使用 jQuery 引用 <iframe> 的文档来获取其高度 ()?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1562255/