为了账号安全,请及时绑定邮箱和手机立即绑定

阻止 Ionic App iframe 中的浏览器选择器 - 阻止打开外部浏览器

阻止 Ionic App iframe 中的浏览器选择器 - 阻止打开外部浏览器

函数式编程 2023-09-18 10:30:53
我在离子应用程序中使用 iframe 作为支付页面。单击 iframe 内的提交 (Senden) 按钮后:带有浏览器的弹出窗口如下所示:如何防止出现此弹出窗口?targer="_self"我在iframe中使用。但它不起作用。
查看完整描述

1 回答

?
慕容708150

TA贡献1831条经验 获得超4个赞

我已经allow-popups allow-top-navigationsandbox的属性中删除了iframe

修复前的 iframe:

<iframe #iframe id="iframe" 
        frameborder="0" 
        [src]="url"
        style="width:100%; border:none;" 
        sandbox="allow-popups allow-top-navigation allow-presentation allow-scripts allow-pointer-lock allow-same-origin allow-forms">
        </iframe>

现在 iframe:

<iframe #iframe id="iframe" 
        frameborder="0" 
        [src]="url"
        style="width:100%; border:none;" 
        sandbox="allow-presentation allow-scripts allow-pointer-lock allow-same-origin allow-forms">
        </iframe>



查看完整回答
反对 回复 2023-09-18
  • 1 回答
  • 0 关注
  • 46 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信