首页 > 解决方案 > 在 iframe 中显示 div

问题描述

我似乎无法让 iframe 显示特定元素。我究竟做错了什么?从 StackOverflow 示例中,我使用以下方法:

注意:iframe 嵌入在 phpbb 论坛中,并引用同一论坛中的页面。

<div class="tab-content">
<form id="ucp" method="post" action="">
<div class="tab-pane">
<fieldset class="framed-ucp">
<legend>Manage notifications</legend>
<p>Here you may view all past notifications.</p>    
<div class="row">
<div class="col-md-4">
<ul class="pagination pagination-sm pull-left">
<li><a href="./ucp.php?i=ucp_notifications&amp;mode=notification_list&amp;mark=all&amp;token=cecbf308" class="mark" data-original-title="" title="">Mark all notifications read</a></li></ul>
</div>
</div>
</fieldset>
</div>
</form>
</div>

<iframe id="notify" src="example.com" seamless="seamless" width="1100" height="600">
</iframe>

document.getElementById('notify').contentWindow.document.getElementById('tab-pane')

标签: jqueryhtmliframe

解决方案


推荐阅读