Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/426.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 从HTML中的iframe设置主窗口的目标_Javascript_Asp.net_Css_Html - Fatal编程技术网

Javascript 从HTML中的iframe设置主窗口的目标

Javascript 从HTML中的iframe设置主窗口的目标,javascript,asp.net,css,html,Javascript,Asp.net,Css,Html,我在一个aspx页面中有2个iframe,在其中一个iframe中,我正在加载一个新的aspx页面,其中我有我的图库图像。我插入了pirobox弹出式插件,将每个图像作为弹出式窗口加载。我的问题是,弹出窗口正在加载iframe本身,我希望弹出窗口覆盖整个屏幕,以便可以查看更大的图像,而无需在iframe中滚动以查看整个图像。请帮我解决这个问题。我是否需要在Javascript或锚定标记本身的某些地方进行更改 这是我的主页: <html> <head> <title

我在一个aspx页面中有2个iframe,在其中一个iframe中,我正在加载一个新的aspx页面,其中我有我的图库图像。我插入了pirobox弹出式插件,将每个图像作为弹出式窗口加载。我的问题是,弹出窗口正在加载iframe本身,我希望弹出窗口覆盖整个屏幕,以便可以查看更大的图像,而无需在iframe中滚动以查看整个图像。请帮我解决这个问题。我是否需要在Javascript或锚定标记本身的某些地方进行更改

这是我的主页:

 <html>
<head>
<title></title>

</head>
<body>
<iframe src="C:\Users\guruprasadr\Downloads\pirobox_extended\demo.html" style="margin-left:50px" height="600px" width="700px"></iframe>
</body>
</html>

这是demo.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Pirobox Extended</title>
<link href="css_pirobox/style_1/style.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="css/css.css"/>
<link rel="stylesheet" type="text/css" href="content/css/default.css"/>
<link rel="stylesheet" type="text/css" href="css/sansation/stylesheet.css"/>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.2.custom.min.js"></script>
<script type="text/javascript" src="js/pirobox_extended.js"></script>
<script type="text/javascript">
$(document).ready(function() {
    $().piroBox_ext({
    piro_speed : 700,
        bg_alpha : 0.5,
        piro_scroll : true // pirobox always positioned at the center of the page
    });
});
</script>
</head>
<body>

<div class="demo">
<ul>
    <li>
        <a href="img/26.jpg" rel="gallery"  class="pirobox_gall" title="Curious kitten.">
            <img src="img/26s.jpg"  />
        </a>
    </li>
<li><a href="Images/300vsSA-Getty.jpg" rel="gallery"  class="pirobox_gall" title="Lights"><img src="img/27s.jpg"  /></a></li>
<li><a href="img/29.jpg" rel="gallery"  class="pirobox_gall" title="Sun salutation."><img src="img/29s.jpg"  /></a></li>
<li><a href="img/30.jpg" rel="gallery"  class="pirobox_gall" title="Bonfire"><img src="img/30s.jpg"  /></a></li>

</ul>
</div>
</body>
</html>

皮罗波克斯扩展
$(文档).ready(函数(){
$().piroBox_分机({
皮罗卢速度:700,
bg_α:0.5,
piro_滚动条:true//pirobox始终位于页面中心
});
});

现在我明白了吗伙计们,如果你把它包括进来,而不是把它框起来

<!-- #Include virtual="C:\Users\guruprasadr\Downloads\pirobox_extended\demo.html" -->

如果这样做,只需包含
标记和Js/CSS

您是否尝试使用
parent.window
在iframe和主文档之间进行交互?
请参阅其他内容:

是的,我们是魔术师,但我们需要一些代码来处理iframe无法处理的问题。但是,您可以使用jQuery在
div
中加载内容,当单击图像时,通过将其定位为绝对值,使
div
全屏显示。IDK,你明白我的意思了吗?没有任何代码,几乎不可能给出准确的答案。但是在我的操作中,您需要在主aspx页面中加载gallery js,并以gallery的子div为目标,然后在整个窗口中打开它们。@badZoke我已经包含了代码。我还需要说点什么吗?@Muhammaddatalhaakbar你能给我举个例子或详细说明一下吗?@GCyrillus。。没有。。我想将这些图像加载到iframe本身,因为它是设计的一部分……好的,那么,我相信iframe必须与parent.window对话,这样parent.window可能会做一些事情:)@GCyrillus。。如果你知道如何让他们彼此交谈,请告诉我:)它一直就在你身边:)