首页 前端知识 Blocked opening '' in a new window because the request was made in a sandboxed frame whose 'allow-popups' permission is not set. 报错

Blocked opening '' in a new window because the request was made in a sandboxed frame whose 'allow-popups' permission is not set. 报错

2024-05-10 13:05:47 前端知识 前端哥 3 0 我要收藏

iframe打开新页面报错:

Blocked opening '<URL>' in a new window because the request was made in a sandboxed frame whose 'allow-popups' permission is not set.




iframe的sandbox属性对呈现在iframe框架中的内容启用一些额外的限制条件。


在sandbox中新增如下:


<iframe  sandbox="allow-forms allow-modals allow-popups allow-scripts allow-same-origin">

转载请注明出处或者链接地址:https://www.qianduange.cn//article/7949.html
评论
会员中心 联系我 留言建议 回顶部
复制成功!