js代码
<script src='js/carousel.js'></script> <script type="text/javascript"> window.onload = function(){ var banner = new Carousel(); //图片地址数组。不要少于三张 var imgSrcDate = ["img/a1.png","img/a2.png","img/a3.png","img/a4.png","img/a5.png","img/a6.png"]; banner.init({ container:"#banner", datas:imgSrcDate, autoplaySpeed:5000, autoplay:false }); } </script>