html套用layui实现页面弹出层

效果:

 

代码:

<button id="add" onclick="useradd()" class="layui-btn"><i class="layui-icon">评估</i>
</button>
/*  ========== 添加弹出层父页面  button 事件 ==============*/
    function useradd() {
        layui.use('layer', function () {
            layer.open({
                type: 2,
                content: ["assess.jsp"],   //添加页,后台controller转发到指定页
                area: ["500px", "565px"],
                title: ['能力评估'],
                fixed: false,
                //maxmin: true,
                shadeClose: true,
                end: function () {  //刷新页面
                    location.reload();
                }
            })
        })
    }

 

posted @ 2022-11-03 20:36  慢漫曼蔓  阅读(625)  评论(0)    收藏  举报