大家好,stackoverflow 的朋友们,我在这里遇到了一个问题。我给了一个iframe
向其他人提供代码以将其嵌入到他的网站上。
这是代码iframe
:
<iframe height="100%" width="100%" frameborder="0" scrolling="auto" src="http://www.mywebsite.com/iframecode" type= "text/javascript"></iframe>
以上iframe
包含以下内容html
:
<html>
<head>
</head>
<body>
//... some html code
<iframe src="http://www.paymentgatway.com/pay" height="100%" width="100%" frameborder="0" scrolling="auto"></iframe>
//... some html code
</body>
</html>
上面这里html
包含另一个iframe
用于付款(第三方)。
Problem:
所以问题是当他点击第二个支付按钮时iframe
,它将 3D 安全页面打开到新选项卡,而不是打开到同一页面。
我努力了 <base target="_self"/>
in <head>
我的 iframe html 的标签,但没有运气。
我已经测试过直接使用付款 iframe,当我单击付款按钮时,它会在同一窗口中打开。
拜托,你能改变我的运气吗?
我看到两件重要的事情:
- Mixin
HTTP
with HTTPS
is not a good practice (unless you try to cheat someone) and even if you do, normally the secure page or the browser will block you.
- If
paymentgatway.com
已正确编码,那么它将不允许您加载到iframe
for 安全原因
所以,基于:
我已经测试过直接使用支付 iframe,当我点击支付按钮时
它在同一窗口中打开。
我会说你在这里面临着两种情况。
结论:
除非您拥有这两个域并且可以修改其源代码,否则您不能paymentgatway.com
page.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)