![](/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.