Home  >  Article  >  Web Front-end  >  js image automatic carousel code sharing (js image carousel)_javascript skills

js image automatic carousel code sharing (js image carousel)_javascript skills

WBOY
WBOYOriginal
2016-05-16 16:49:361507browse

1. Use the image width display position to play the image. Technology: .offsetWidth, aBtn[i].index = i, setInterval(), oUl[0].style.left = , onclick()
2. Use an array to put pictures into a carousel, technology: setInterval(). No onclick()

Picture carousel 12js.html

Copy code The code is as follows:

   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

 
  
  images slide
 

 
 

 

  
  
  
  

       

  •    

  •    

  •    

  •    

  •    

  •   

  
 
   
   
   
   
   
   
  

 



图片自动播放.html

复制代码 代码如下:



 
  
  images
 

 
 
 
  
 

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn