![](/img/trans.png)
[英]How to post data from an iframe to another iframe at a different page
[英]Is there any way instead of a JS hack where I can post from an iframe to another page outside the iframe?
有什么方法可以代替JS hack,可以将iframe从iframe发布到iframe之外的其他页面?
iframe将数据发布到第三方,然后仅以URL(作为重定向UR1)进行响应,因此我们无法设置表单目标。 我们符合PCI标准,因此不能使用window.parent.location = url;
它看起来可以归结为:
1.您从iframe中的第3方获得了文本网址。
2.您想要将页面的位置更改为该URL。
3.除非您控制该第三方,否则您将获得的只是该文本URL。
现在,唯一自动更改页面位置的方法是使用window.parent.location
(或window.location
。
如果使用javascript更改页面的网址不符合PCI,则您正在尝试执行与PCI不兼容的操作。
<form>
接受目标参数,例如target =“ _ parent”
在锚标记中,您可以设置target='_parent'
这将导致将该网址加载到父窗口中。
不 ,唯一的方法是使用javascript。 但是使用window.parent.location = url;
并不是真正的黑客window.parent.location = url;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.