I just touch the front end, a lot of knowledge still do not understand, before often to the blog park to inquire about their needs, and now finally his new. As a novice, the show is also easy to understand, I hope the same with the novice partners to communicate and common progress, if successful capture a big, also please enlighten you. I do not know whether here can be fortunate to find a patient point of the teacher, my future master Ah, come here AH ~ ~
Don't talk nonsense, just on the code
1<! DOCTYPE html>23 45<meta charset= "UTF-8" >6<title></title>7<style type= "Text/css" >8 img {9 border:5px solid tan;Ten } One span { A padding:5px; - border:1px solid; - position:relative; theTop:-28px; - left:4px; - Cursor:pointer; - } +</style> - + A<body> at -<span id= "img" onclick= "onshow (1)" >1</span> -<span id= "img" onclick= "OnShow (2)" >2</span> -<span id= "img" onclick= "OnShow (3)" >3</span> -<span id= "img" onclick= "OnShow (4)" >4</span> -<script type= "Text/javascript" > in functiononshow (num) { - varimg = document.getElementById ("IMGs"); to varIMGs = document.getElementsByTagName ("img") + for(vari = 0; i < imgs.length; i++) { - } theIMG.SRC = ". /img/pro_0 "+ num +". jpg "; * } $ varCount = 1;Panax NotoginsengSetInterval (function() { -count++; the if(Count = = 5) { +Count = 1; A } the OnShow (count); +}, 3000) -</script> $</body> $:
span tags should be beautified, but at present I have no ideas, hope that the guidance of the big!
2017-04-09
JavaScript Lite Automatic Carousel manual Carousel Novice Communication