Post 跨域后iframe
我想将表单中的数据发布到另一个域中的IFRAME。有什么简单的方法可以做到这一点吗Post 跨域后iframe,post,iframe,dns,Post,Iframe,Dns,我想将表单中的数据发布到另一个域中的IFRAME。有什么简单的方法可以做到这一点吗 <iframe name="iframe" width="100" height="100" src="www.otherdomain.com" /> <form action="www.mydomain.com" method="post" target="iframe"> <input type="text" name="text1" value="123" /> <
<iframe name="iframe" width="100" height="100" src="www.otherdomain.com" />
<form action="www.mydomain.com" method="post" target="iframe">
<input type="text" name="text1" value="123" />
<input type="text" name="text2" value="456" />
<input type="submit" value="submit"/>
</form>
<pre><?php var_dump($_POST);?></pre>
我认为你的例子应该行得通。我已经设置了两个虚拟主机pastefrom.com pasteto.com 在我的本地主机上 :
<pre><?php var_dump($_POST);?></pre>
array(1) {
["search"]=>
string(6) "google"
}