在 Firefox 中,这很好用 - toastr ( https://github.com/CodeSeven/toastr ) 显示成功和错误消息。在 IE 中,没有错误,也不显示消息。我如何调用 toastr 方法有问题吗?
$.ajax({
url: '/api/emailtemplate/',
type: 'POST',
data: ko.toJSON(self),
contentType: 'application/json',
//dataType: 'json',
success: function (result) {
toastr.success('Template was saved successfully!');
},
error: function () { toastr.error('Template was not saved.', 'Template error!'); }
});