1

当我单击父窗口中的按钮时,必须在页面中加载的 iframe 中显示隐藏 div 标签中的弹出窗口....我不明白我哪里出错了,所以请帮帮我

<html>
<head>
<title>The iframe</title>
<SCRIPT TYPE="text/javascript">
<!--
function popup(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
   href=mylink;
else
   href=mylink.href;
window.open(href, windowname, 'width=400,height=200,scrollbars=yes');
return false;
}
//-->
</SCRIPT>
</head>
<body>
<div id="popup"style="visibility:hidden;"><strong><h1>POPUP</strong></h1>
<A 
   HREF="inframe.html" 
   onClick="return popup(this, 'notes')">click me</A>
</div>
<body>
</html>
4

0 回答 0