function fixHeight() {
var headerHeight = $("#switcher").height();
$("#iframe").attr("height", $(window).height() + "px");
}
$(window).resize(function() {
fixHeight();
}).resize();
//iframe頁面自適應
function setIframeHeight(iframe) {
if (iframe) {
var iframeWin = iframe.contentWindow || iframe.contentDocument.parentWindow;
if (iframeWin.document.body) {
iframe.height = iframeWin.document.documentElement.scrollHeight || iframeWin.document.body.scrollHeight - 20;
}
}
}
js自適應
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.