layer如何隐藏弹出层关闭的按钮

需添加closeBtn :0即可

示例代码如下:

layer.open({
    content: '/Index5S',
    area: ['900px', '450px'],
    title: '2025年战略目标',
    type: 2,
    closeBtn: 0,
    success: function(layero, index) {
        var i5s = setInterval(function () {
            t5s -= 1;
            layer.title(`2025年战略目标,${t5s}秒后关闭`, index);
            if (t5s == 0) {
                layer.close(index);
                clearInterval(t5s);
            }
        }, 1000)
    }
})

 

posted @ 2025-05-05 13:36  microsoft-zhcn  阅读(56)  评论(0)    收藏  举报