layer open用法

  layer.open({
                title: '添加管理员',
                type: 1,
                area: ['700px', '530px'],
                fix: false, //不固定
                maxmin: true,
                content: $('#dlgAdd').html(),
                success: function (layero, index) {
                },
                end: function () {
                    var handle_status = $("#handle_status").val();
                    if (handle_status == '1') {
                        layer.msg('添加成功!', {
                            icon: 1,
                            time: 2000 //2秒关闭(如果不配置,默认是3秒)
                        }, function () {
                            history.go(0);
                        });
                    } else if (handle_status == '2') {
                        layer.msg('添加失败!', {
                            icon: 2,
                            time: 2000 //2秒关闭(如果不配置,默认是3秒)
                        }, function () {
                            history.go(0);
                        });
                    }
                }
            });

猜你喜欢

转载自www.cnblogs.com/jamal/p/10036324.html