简单iframe高度自适应代码
1 js函数
function adjustFrameHeight(obj) { var doc = obj.document||obj.contentWindow.document; obj.height=doc.documentElement.scrollHeight;}2 html代码样例
<iframe src="url" onload="adjustFrameHeight(this);"></iframe>
以上代码兼容ie,firefox