【发布时间】:2012-01-10 11:12:00
【问题描述】:
--mainPage.php----
<div>
<iframe>pageA.php</iframe>
</div>
<div>
<iframe>pageB.php</iframe>
</div>
主页面包含两个 iframe,分别链接到 pageA.php 和 pageB.php。
在PageA.php 上,有一个链接可以点击显示popUpWindow.php。 (参见弹出窗口示例:http://www.javascript-coder.com/files/window-popup/javascript-window-open-example1.html)。
在我的情况下,popUpWindow.php 不会弹出,并且 pageA.php 在单击链接后被 popUpWindow.php 替换。以下是我的代码,有人可以帮助我吗?提前致谢!
--pageA.php-----
<script type="text/javascript">
// Popup window code
function newPopup(url) {
popupWindow = window.open(
url,'popUpWindow','height=700,width=700,left=10,top=10,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no,status=yes')
}
</script>
<a href="popUpWindow.php">Link</a>
【问题讨论】:
-
你需要设置锚点目标。
标签: javascript html iframe