请教大神让js鼠标放上去固定,移开自动切换
请教大神让js鼠标放上去固定,移开自动切换,现在已实现自动切换,鼠标放上去也是切换,程序代码:
<script type="text/javascript"> var tt function changeShow(num) { number=num number++; if(number>3){ number=1; } for (var i = 1; i < 4; i++) { document.getElementById("liTitle" + i).className = "off"; document.getElementById("ulcontent" + i).style.display = "none"; } document.getElementById("liTitle" + num).className = "on"; document.getElementById("ulcontent" + num).style.display = "block"; } var number=1 $(function(){ tt=setInterval(function(){ changeShow(number) },2000) }) </script>
请高手帮忙看一下