js代码
<script type="text/javascript" src="bootstrap/js/bootstrap.min.js"></script> <script type="text/javascript" src="js/echarts.min.js"></script> <script type="text/javascript" src="js/china.js"></script> <script type="text/javascript" src="js/angular.min.js"></script> <script type="text/javascript" src="js/mycharts.js"></script> <script> $(document).ready(function() { $('.ym-menu li').click(function() { var index = $(this).index(); $(this).attr('class', "ym-active").siblings('li').attr('class', 'taba'); $('.tabcontent').eq(index).show(200).siblings('.tabcontent').hide(); }); var t = 0; var timer = setInterval(function() { if(t == $('.ym-menu li').length) t = 0; $('.ym-menu li:eq(' + t + ')').click(); t++; }, 3000) }) </script>