【问题标题】:How to hide notification when new one comes up with toastr当新的 toastr 出现时如何隐藏通知 【发布时间】:2016-12-06 18:24:49 【问题描述】: 我的应用程序中弹出通知,我希望在新通知出现时隐藏旧通知(我不希望同时显示两个通知)。 如何使用 toastr 来获得这种效果? 【问题讨论】: 标签: javascript toastr 【解决方案1】: 您可以使用clear 函数: toastr.clear(); 希望对你有帮助。 来源:officiel documentation。 【讨论】: 你能告诉我如何只清除信息通知,可以吗? 我认为这是不可能的,因为它没有包含在文档中。