报错myFocus.set() undefined
我的代码如下
<head> <meta charset="UTF-8"> <title>慕课网</title> <link rel="stylesheet" href="css/index.css"> <script scr="js/myfocus-2.0.1.min.js" type="text/javascript" charset="utf-8"></script> <script scr="js/mf-pattern/mF_YSlider.js" type="text/javascript" charset="utf-8"></script> <link rel="stylesheet" href="js/mf-pattern/mF_YSlider.css"> <script type="text/javascript"> myFocus.set({ id:'picBox' }); </script> </head> <div class="ad" id="picBox"> <div class="pic"> <ul> <li><img src="imagescr/ad2.jpg" alt="展示图片"></li> <li><img src="imagescr/ad3.jpg" alt="展示图片"></li> <li><img src="imagescr/ad4.jpg" alt="展示图片"></li> </ul> </div> </div>
焦点图没效果,调试发现浏览器报错说:myFocus.set() undefined,可是检查了JS文件引入路径,发现没问题,求大神指教