function reinitIframe(){
//$("#external-frame").height = $(document.body).height();
try{
var iframe = document.getElementById("external-frame");
if(iframe.attachEvent){
iframe.attachEvent("onload", function(){
iframe.height = iframe.contentWindow.document.documentElement.scrollHeight;
});
return;
}else{
iframe.onload = function(){
iframe.height = iframe.contentDocument.body.scrollHeight;
};
return;
}
}catch(e){
throw new Error('setIframeHeight Error');
}
}
Iframe自適應記錄
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.