ace 改写iframe布局 管理后台模板(三) 选择弹出框,确认框

选择弹出框,当然首先要看外观。一定要好看才行,另外和页面的风格比较匹配。挑来挑去,选择:jquery-confirm v 3.3.0 下载地址 http://craftpip.github.io/jquery-confirm/

jquery-confirm与bootstrap有很好的结合,直接引入.js和.css文件就可以使用了


一定要注意 jquery-confirm.js 要放在jquery.js文件的下面引入,要求:jQuery library > v1.8

效果图如下:这里写图片描述

alert弹出框的写法非常简单:

$.alert('请选择需要操作的记录!');

这里写图片描述

确认框代码:

$.confirm({
                    title: '删除',
                    content: '确定要删除选中的记录吗',
                    icon: 'fa fa-question-circle',
                    animation: 'scale',
                    closeAnimation: 'scale',
                    opacity: 0.5,
                    buttons: {
                        'confirm': {
                            text: '确定',
                            btnClass: 'btn-blue',
                            action: function () {
                                 $.alert('删除操作成功!');
                            }
                        },
                        cancel:{
                                text:'取消',
                                action: function () {
                             //$.alert('取消当前操作!');
                          }
                        },

                        /*moreButtons: {
                            text: 'something else',
                            action: function () {
                                $.alert('you clicked on <strong>something else</strong>');
                            }
                        },
                        */
                    }
                });

title:确认框标题
content:确认框内容
icon:确认框图标
buttons:确认框上显示的按钮
confirm:确认按钮信息及要关的操作
confirm-action:确认按钮后台操作可写在这里

猜你喜欢

转载自blog.csdn.net/qlp3643_1/article/details/82350757
ACE