您当前的位置: 首页 >  ui

漏刻有时

暂无认证

  • 0浏览

    0关注

    717博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

layui框架实战案例(4):因内容安全策略导致弹出层模态框无法正常显示微信公众号文章使用window.open的解决方案

漏刻有时 发布时间:2020-08-25 09:41:49 ,浏览量:0

在这里插入图片描述

in a frame because an ancestor violates the following Content Security Policy directive: "frame-ancestors 'self'

解决方案

/*弹出窗口*/
function getWin(URL, name) {
    var bschitchat = window.open(URL, name, 'toolbar=no,menubar=no,scrollbars=auto,resizeable=no,location=no,status=no');
    bschitchat.moveTo(0, 0);
    bschitchat.resizeTo(screen.availWidth, screen.availHeight);
    bschitchat.outerWidth = screen.availWidth;
    bschitchat.outerHeight = screen.availHeight;
}

Done!

关注
打赏
1661217259
查看更多评论
立即登录/注册

微信扫码登录

0.0390s