html - 阻止 Ionic App iframe 中的浏览器选择器 - 阻止打开外部浏览器
问题描述
我在离子应用程序中使用 iframe 支付页面。单击 iframe 内的提交(发送)按钮后:
带有浏览器的弹出窗口如下所示:
如何防止出现此弹出窗口?
我targer="_self"
在 iframe 中使用。但它不起作用。
解决方案
我已经allow-popups allow-top-navigation
从.sandbox
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>
推荐阅读
- javascript - VueJS 中的作用域插槽到底是什么?
- c# - SMTP 服务器需要安全连接或客户端未通过身份验证。服务器响应为:需要 5.7.0 身份验证。C#
- amazon-web-services - Zabbix Agent 自动注册 - Zabbix Server
- python - 从 Yaml 文件中读取正则表达式字符串会使反斜杠加倍
- python - Tweepy、高级 API 和速率限制 - 在不到 10 分钟内达到 250 个请求,几乎没有 10,000 条推文
- node.js - findOneAndUpdate() 用于两个不同的 ObjectId,但只更新一个
- python - Python - 错误:lib_type = fields[4] IndexError:列表索引超出范围
- typescript - Typescript中命名元组的通用名称是什么?
- json - 为什么 JSONDecoder 总是为可选属性返回 nil?
- python - AttributeError:“PathCollection”对象没有属性“markeredgecolor”