<script type="text/javascript">
    function delMessage(id, type) {
        $.mbox({
            area: ['250px','auto'],
            border : [0, 0.5, '#666'],
            dialog: {
                msg: '确认删除吗?',
                btns: 2,
                type: 2,
                btn: ['确定','取消'],
                yes: function(){
                    $.ajax({
                        type: "GET",
                        url: "{:U('user/delmessage')}",
                        data: { id: id, type: type},
                        success: function (result) {
                            mbox.msg(result, 2, 1);
                            if(result.indexOf('成功') != -1){
                                $('#node_'+ type +'_' + id).remove();
                            }
                        }
                    })
                }, no: function(){
//                    layer.msg('奇葩', 1, 13);
                    return false;
                }
            }
        });

    }

</script>

http://sentsin.com/jquery/layer/



本文转载:CSDN博客