我遇到了无法使用 noty 插件显示通知的问题。我在 ASP.net Web 应用程序中包含了这个插件。
_Layout.cshtml
<link href="~/lib/bootstrap/dist/css/bootstrap.css" rel="stylesheet" />
<link href="~/lib/bootstrap-table/dist/bootstrap-table.css" rel="stylesheet" />
<link href="~/css/site.css" rel="stylesheet" />
<link rel="stylesheet" href="~/css/sticky_footer.css" />
<link href="~/lib/noty/lib/noty.css" rel="stylesheet" />
<script src="~/lib/jquery/dist/jquery.js"></script>
<script src="~/lib/jquery-validation/dist/jquery.validate.js"></script>
<script src="~/lib/jquery-validation/dist/additional-methods.js"></script>
<script src="~/lib/js-cookie/src/js.cookie.js"></script>
<script src="~/lib/bootstrap/dist/js/bootstrap.js"></script>
<script src="~/lib/bootstrap-table/dist/bootstrap-table.js"></script>
<script src="~/lib/noty/lib/noty.js"></script>
<script src="~/lib/moment/min/moment.min.js"></script>
<script src="~/lib/he/he.js"></script>
<script src="~/lib/bootstrap-table-contextmenu/dist/bootstrap-table-contextmenu.min.js"></script>
创建.cshtml
$updateSessionSynopsisHandler.done(function (data, textStatus, jqXHR) {
noty({
text: data.message, type: 'success',
layout: 'center'
});
});