2
我有一个包含2个iframe的页面,其中包含3个文件。第二IFRAME具有内部一种形式中,这样的:双iframe问题
的页面,用户访问(http://domain1.com/index.html):
<html>
<head>
</head>
<body>
<iframe name="ifr1" src="http://domain2.com/index.html" width="800" height="1000" scrolling="no">
</iframe>
</body>
</html>
的domain2.com/index.html
页<html>
<head>
</head>
<body>
<iframe name="ifr2" src="http://domain3.com/form.html" width="400" height="400" scrolling="no">
</iframe>
</body>
</html>
页domain3.com/form.html的
<html>
<head>
</head>
<body>
<form method='post' action='http://domain3.com/check.php' target='_parent' id='cform'>
<input type="text" name="inp1">
<input type="submit" value="send">
</form>
</body>
</html>
所以,当用户访问domain1.com/index.html,结果HTML BEC omes:
<html>
<head>
</head>
<body>
<iframe name="ifr1" src="http://domain2.com/index.html" width="800" height="1000" scrolling="no">
<html>
<head>
</head>
<body>
<iframe name="ifr2" src="http://domain3.com/form.html" width="400" height="400" scrolling="no">
<html>
<head>
</head>
<body>
<form method='post' action='http://domain3.com/check.php' target='_parent' id='cform'>
<input type="text" name="inp1">
<input type="submit" value="send">
</form>
</body>
</html>
</iframe>
</body>
</html>
</iframe>
</body>
</html>
当用户提交表单,我想要加载在名为IFR1的iframe的http://domain3.com/check.php内容,但形式提交时,它加载在新窗口/标签的check.php内容。
我更改了check.php的域名,并将其复制到了domain2中,以检查它是否正常工作。这是否意味着将表单内容发送到不同的域名是错误的?有人对此有任何想法吗?
非常感谢! :)
这是不一致的跨浏览器? – Alohci 2011-06-14 08:58:02
不同的浏览器?我正在使用Firefox进行整个测试。 – Arthur 2011-06-14 09:09:59