iframe,window,捲軸的一些問題,iframewindow

來源:互聯網
上載者:User

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所引用的頁面加.
 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.