我喜欢我可以用 toastr 做什么的想法,但我似乎无法让它发挥作用。
从官方页面...
(1) Link to toastr.css
(2) Link to toastr.js
(3) Use toastr to display a toast for info, success, warning or error
To install toastr, run the following command in the Package Manager Console
Install-Package toastr
我下载了 NuGet 的命令行版本并输入install toastr
并成功安装,(虽然我不知道它实际上做了什么......)然后,在我的页面中test.php
,我有以下代码:
<html>
<head>
<link rel="stylesheet" href="/toastr.css">
<script type="text/javascript" src="/toastr.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<script type="text/javascript" src="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
</head>
<body>
toastr.info('Hey - it works!');
</body>
该网站本身说这非常简单......
// Display an info toast with no title
toastr.info('Are you the 6 fingered man?')
但是当我执行页面时,我看到的只是字面意思:
toastr.info('嘿 - 它有效!');
我究竟做错了什么?