<button class="btn btn-success" id="opener" onclick="ValidateReport('<%=generatecampaign%>','<%=loading_img_path%>','<%=IS_HTML%>','Campaign_Report');">Preview</button>
以上就是我的預覽按鈕鉻爲什麼每次增加iframe的高度與10px的時候IFRAME負荷?
以下是我的iframe whhich加載一些HTML中的iframe,並與將在IFRAME被加載在HTML文件中的數據調整的iframe
<div class="bordercolor" id="mydiv" style="display: none; text-align: center">
<IFRAME SRC="" id="reportpreview" style="text-align: center; clear:both;"
marginheight="0" frameborder="0" onLoad="sizeFrame();"></iframe>
<iframe id="myIFrm" src="" style="display: none;"> </iframe>
</div>
以上就是我IFRAME是加載HTML文件中,並調整iframe中的內容爲每個HTML文件內容...並在沒有HTML文件,然後只是簡單地加載一個標籤名一個靜態的html文件作爲「無可用數據」
我的概率是LEM是當我使用鉻,當我要加載的HTML file..it automaticaly增加IFRAME 10PT的高度。汽車無上按下預覽button.but當我嘗試調整iframe的高度爲什麼它不清除以前的高度值...
以下是在JavaScript我sizeFrame()函數調用上的iframe的onLoad
function sizeFrame() {
var F=null;
F = document.getElementById('reportpreview');
if(F.contentDocument) {
F.height=0;
F.height = F.contentDocument.documentElement.scrollHeight+10; //FF 3.0.11, Opera 9.63, and Chrome
} else {
F.height=0;
F.height = F.contentWindow.document.body.scrollHeight+10; //IE6, IE7 and Chrome
}
}