【发布时间】:2015-10-17 10:04:26
【问题描述】:
我使用 jquery 根据内容自动调整 iframe 的高度。它在 Firefox 中完美运行,但在 Safari 中它总是给我错误的高度(150px)。
有什么解决办法吗?
function resizeIframe(obj){
{obj.style.height = 0;};
{obj.style.height = obj.contentWindow.document.body.scrollHeight + 'px';}
}
【问题讨论】:
标签: jquery iframe safari resize height