小编ont*_*ike的帖子

toastr没有定义

加载页面时在开发人员控制台中收到以下错误:

未捕获的ReferenceError:未定义toastr

这是html内容.有人可以向我解释为什么toastr未定义?

<!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>
Run Code Online (Sandbox Code Playgroud)

html javascript jquery toastr

2
推荐指数
1
解决办法
2万
查看次数

标签 统计

html ×1

javascript ×1

jquery ×1

toastr ×1