javascript - 请问如何在nofity的提示框中加入按钮?
伊谢尔伦
伊谢尔伦 2017-04-11 12:30:14
[JavaScript讨论组]
$.notify({
                      title: '确定要删除此模板吗!',
                      message: ""
                    },{
                      element: 'body',
                      type: 'warning',
                      placement: {
                        from: "top",
                        align: "center"
                      },
                      template: '

' + '

' + ''+ '

' + '

' + '

' });

我这样加的,但是没有反应。。
谢谢!

伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

全部回复(2)
高洛峰
template: '<p data-noify="container" class="col-xs-11 col-sm-3 alert alert-{0}" role="alert">' +
                        '<span data-notify="icon"></span> ' +
                        '<span data-notify="title">{1}</span> ' +
                        '<span data-notify="message">{2}</span>' +
                        '<p class="progress" data-notify="progressbar">' +
                        '</p>' +
                        '<br />'+
                        '<button type="button" class="btn btn-sm btn-warning confirmDel" style="margin-top:20px;">确定</button>'+
                        '<button type="button" class="btn btn-sm btn-info undelete" style="margin-top:20px; margin-left:20px;">取消</button>'+
                        '</p>'

这样设置就行

黄舟
    $.notify({
    
        buttons: [
            {addClass: '', text: '', onClick: clickHandler}
        ]
        
    })
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号