私はインターネット全体を検索し、狂ったようにスタックオーバーフローを実行し、問題の半分を解決しました。リンクをクリックしてページのフルサイズを読み込むときにiframeのサイズを設定しようとしていますが、IEで動作するようになりましたしかし、FFでは何も起こりません。同じ高さを維持するだけです。
IEで機能するコード
function calcHeight() {
var the_height = 0;
//find the height of the internal page
if (/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)) { //test for Firefox/x.x or Firefox x.x (ignoring remaining digits);
the_height = document.getElementById('class').contentDocument.body.offsetHeight + 140;
}
else {
the_height = document.getElementById('class').contentWindow.document.body.scrollHeight + 18;
}
document.getElementById('class').height = the_height + "px";
}
Iframeコード
<iframe src="iframback.html" name="class" id`="class" width="100%" height="auto" scrolling="no" frameborder="0" onload="calcHeight();" allowtransparency='true'></iframe></td>
私はこれを理解することはできません!これは、「Ohio Conceal Handgun License(CHL)」をクリックして、その横にコードを表示し、IEの場合と同じようにIFRAMEを展開できると思われるテストページへのリンクです。ありがとう! http://www.dualactiontactics.com/Update/7/Training.html