Blogger Information
Blog 91
fans 2
comment 4
visits 127883
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
根据layer整合的弹框
夏日的烈风的博客
Original
763 people have browsed it

var dialog = {

    // 错误弹出层

    error: function(message) {

        layer.open({

            content:message,

            icon:2,

            title : '错误提示',

        });

    },


    //成功弹出层

    success : function(message,url) {

        layer.open({

            content : message,

            icon : 1,

            yes : function(){

                location.href=url;

            },

        });

    },


    // 确认弹出层

    confirm : function(message, url) {

        layer.open({

            content : message,

            icon:3,

            btn : ['是','否'],

            yes : function(){

                location.href=url;

            },

        });

    },


    //无需跳转到指定页面的确认弹出层

    toconfirm : function(message) {

        layer.open({

            content : message,

            icon:3,

            btn : ['确定'],

        });

    },

}



如果用的话就用 ruturn  dialog .error(); 这样的用法

Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post