加载页面时,在开发人员控制台中收到以下错误:
未捕获的ReferenceError:未定义Toastr
这是html内容。有人可以向我解释为什么未定义烤面包机吗?
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/css/toastr.min.css">
</head>
<body>
<p>Toastr TEST</p>
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js">
</script>
<script scr="http://cdnjs.cloudflare.com/ajax/libs/toastr.js/2.0.2/js/toastr.min.js">
</script>
<script>
$(document).ready(function() {
console.log("document.ready");
toastr.info('document.ready');
});
$(window).load(function() {
console.log("window.load");
toastr.info('window.load');
});
</script>
</body>
</html>
您对toaster.js文件的脚本elemen的src属性拼写错误,它应该是“ src”,但是是“ scr”。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句