Javascript Toastr js添加一个“删除/删除”按钮

Javascript Toastr js添加一个“删除/删除”按钮,javascript,dialog,toastr,Javascript,Dialog,Toastr,我正在尝试将Toastr js设置为一个对话框按钮 我只需要在我的Toastr消息上有一个“批准”和一个“取消批准”按钮 toastr.options = { "closeButton": true, "debug": false, "positionClass": "toast-bottom-left", "onclick": null, "showDuration": "1000", "hideDuration": "1000", "t

我正在尝试将Toastr js设置为一个对话框按钮

我只需要在我的Toastr消息上有一个“批准”和一个“取消批准”按钮

toastr.options = {
    "closeButton": true,
    "debug": false,
    "positionClass": "toast-bottom-left",
    "onclick": null,
    "showDuration": "1000",
    "hideDuration": "1000",
    "timeOut": "5000",
    "extendedTimeOut": "1000",
    "showEasing": "swing",
    "hideEasing": "linear",
    "showMethod": "fadeIn",
    "hideMethod": "fadeOut"
}
toastr.info("Do you wish to continue");
有人知道这是否可行,或者知道其他允许我这么做的脚本吗

请注意


我知道这可以通过Modal实现,但我想尝试避免它。

当然。您可以向toast添加任何HTML,然后将事件处理程序连接到它。有关更多详细信息和示例,请参见演示

您可以为toastr js添加按钮

例如,单击
ok
按钮以清除
toastr

toastr.info('message <button type="button" class="btn clear btn-toastr" onclick="toastr.clear()">OK</button>' , 'Studio Message:');
toastr.info('message OK','Studio message:');