Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/401.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 在一个页面的iframe中从另一个页面的iframe打开html页面 第1页 第1页_Javascript_Php_Html_Iframe_Target - Fatal编程技术网

Javascript 在一个页面的iframe中从另一个页面的iframe打开html页面 第1页 第1页

Javascript 在一个页面的iframe中从另一个页面的iframe打开html页面 第1页 第1页,javascript,php,html,iframe,target,Javascript,Php,Html,Iframe,Target,page1包含iframe1,该iframe1为空,在开始时不显示任何内容 第2页 第2页 page2包含显示opening.php的iframe2 opening.php opening.php包含一个链接,其中href=check.php和 check.php 好吧 我想从opening.php打开check.php,它显示在第2页的iframe2中,在第1页的iframe1中。请帮忙 然后创建一个指向page1.php的链接,并在它的iframe中加载check.php(硬编码

page1包含iframe1,该iframe1为空,在开始时不显示任何内容

第2页

第2页
page2包含显示opening.php的iframe2

opening.php

opening.php包含一个链接,其中href=check.php和

check.php

好吧

我想从opening.php打开check.php,它显示在第2页的iframe2中,在第1页的iframe1中。请帮忙

然后创建一个指向page1.php的链接,并在它的iframe中加载check.php(硬编码或有条件地取决于$_getvar),因为在page2时page1没有加载,所以无法以您尝试过的方式工作。
<!DOCTYPE html>
<html>
<head>
    <title></title>
</head>
<body>
    <h1>page1</h1>
<iframe src="" name="iframe1" id="iframe1"></iframe>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
    <title></title>
</head>
<body>
    <h1>page2</h1>
<iframe src="opening.php" name="iframe2" id="iframe2"></iframe>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
    <title></title>
</head>
<body>
<a href="check.php" target="iframe1">click</a>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
    <title></title>
</head>
<body>
<h1>alright</h1>

</body>
</html>