Javascript 如何在包含iframe的整个页面中使用弹出窗口?

Javascript 如何在包含iframe的整个页面中使用弹出窗口?,javascript,jquery,html,iframe,popup,Javascript,Jquery,Html,Iframe,Popup,我想创建一个大小为200X200的iframe。我想在其中使用一个弹出代码。但我面临一个问题 当前,当我单击空间200x200时会显示弹出窗口,但我希望当我单击包含iframe的页面时会显示弹出窗口。(不仅是iframe区域,而且是整个页面) 每当我把iframe放在一个页面上时,我希望弹出窗口是apear,因为它是原始页面的弹出窗口,而不仅仅是iframe 有人知道我如何使用html、javascript或jquery执行此操作吗 谢谢当用户单击身体的某个元素而不仅仅是框架时,请进行弹出调用。

我想创建一个大小为200X200的iframe。我想在其中使用一个弹出代码。但我面临一个问题

当前,当我单击空间200x200时会显示弹出窗口,但我希望当我单击包含iframe的页面时会显示弹出窗口。(不仅是iframe区域,而且是整个页面)

每当我把iframe放在一个页面上时,我希望弹出窗口是apear,因为它是原始页面的弹出窗口,而不仅仅是iframe

有人知道我如何使用html、javascript或jquery执行此操作吗


谢谢

当用户单击身体的某个元素而不仅仅是框架时,请进行弹出调用。
如果您提供JavaScript和HTML代码,我可以为您提供更多帮助。

使用自动调整JavaScript代码大小

<script type="Text/JavaScript" language="JavaScript">
<!--
function resize_iframe()
{
    var height=window.innerWidth;//Firefox
    if (document.body.clientHeight)
    {
        height=document.body.clientHeight;//IE
    }
    //resize the iframe according to the size of the
    //window (all these should be on the same line)
    document.getElementById("cam").style.height=parseInt(height-
    document.getElementById("cam").offsetTop-8)+"px";
}

// this will resize the iframe every
// time you change the size of the window.
window.onresize=resize_iframe; 

//Instead of using this you can use: 
//  <BODY onresize="resize_iframe()">

</script>
</head>
<body>
<iframe id="cam" width="100%" scrolling="yes" src="http://www.your_page.com" onload="resize_iframe()">
</iframe>
</body>