我在 test.aspx 中有一个 iframe,当用户单击 iframe 内的支付按钮时,iframe 重定向到具有相同 iframe 的 check.aspx
如果第一次付款成功,then window.parent.location.href==test.aspx
如果付款失败,iframe 会再次重定向到 check.aspx,所以现在
window.parent.location.href==check.aspx
当付款失败时,iframe 保持重定向到 check.aspx 并且父位置不断变化,例如,如果客户端失败 3 次,我需要在 check.aspxwindow.parent.parent.parent.location.href
中获取 test.aspx 重定向。
当用户付款成功时,我想重定向 test.aspx 但我不知道他有多少子 iframe 窗口!
我需要类似的东西
window.parent[0].location.href=success.aspx,这样我就可以重定向第一个父窗口。
谢谢你的帮助
巴罗兹