iframe,window,捲軸的一些問題,iframewindow
1.Iframe不顯示邊框:frameborder=0
2.Iframe不顯示橫向捲軸:在iframe所指向的頁面加入:
<style>
html{overflow-x:hidden;}
</style>
3.Iframe動態重新整理:在父頁面中:iframeId.window.location.replace(url);//會請求url
4.Iframe父頁面調用子頁面的方法:
document.getElementById("iframeId").contentWindow.showActiveNumImg();
Ifarme 子頁面調用父頁面的方法:
parent.window.functionName();
5.被開啟的子window調用父window的元素:
window.opener.document.getElementById("alarmRuleArea")
6.Div中顯示橫向捲軸,而不顯示縱向捲軸:
<div id="listContent" name="listContent" style="width:100%;height:185;overflow-x:hidden;scroll:yes;"></div>
7.父頁面擷取iframe子頁面的元素:$("#numberConfirmListIframe").contents().find("input[type='checkbox'][name='checkboxName']:checked").each(
function(){
selectedvalue.push($(this).val());
}
);
iframe子頁面擷取父頁面的元素:
$(“#父視窗中的元素id”,parent.document);
iframe捲軸問題
window.parent.document.getElementById('main').height = 1200; 動態去設定高度
Iframe捲軸問題
在你的檔案前面加上
<%
response.redirect "#top"
%>
然後在要滾動的地方加上代碼:
<div align="center"><a name="top"></a>
</div>
對了,這要是ASP頁面的,在你iframe所引用的頁面加.