【问题标题】:Jquery : noty confirmation messageJquery:通知确认消息
【发布时间】:2013-11-30 08:49:00
【问题描述】:

我正在使用 JQuery noty 插件。我需要 Confirmation 消息框,Confirmation Message BoxButtons 一起很好用,但 Buttons 点击事件 > 不工作。当我点击任何按钮。它给了我 HTTP Error 404.0 - Not Found. The resource you are looking for has been removed, had its name changed, or is temporarily unavailable. 错误。下面是我的代码。

 noty({
        text: 'Are you sure?',
        type: 'confirm',
        buttons: [
           {
               addClass: 'btn btn-primary', text: 'Ok', onClick: function ($noty) {
                   $noty.close();
                   noty({ text: 'You clicked "Ok" button', type: 'success' });
               }
           },
           {
               addClass: 'btn btn-danger', text: 'Cancel', onClick: function ($noty) {
                   $noty.close();
                   noty({ text: 'You clicked "Cancel" button', type: 'error' });
               }
           }
        ]
    })

这有什么问题。

【问题讨论】:

  • 使用javascript确认对话框出现在屏幕上,代码执行在此时停止。使用通知确认框时,它只出现在屏幕上,但下面的代码也会被执行。有什么想法吗?

标签: javascript jquery noty


【解决方案1】:

检查脚本是否真的通过 firebug/devtools 加载,以及您的路径是否正确。测试了你的代码,它对我有用。

【讨论】:

猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-01-13
  • 1970-01-01
  • 1970-01-01
  • 2021-10-28
  • 2012-05-10
  • 1970-01-01
相关资源
最近更新 更多