2. Method of playing file list. The main thing is to traverse the file list and display the pictures in the corresponding picture containers to display the slide effect.
You can use the delayed method to call the traversal method: window.setInterval("PlayPics()", speed);
/** * How to process playback images **/ function PlayPics() { var sel = document.getElementById("img_date") ; if(sel.length==0)//If there is no picture, return directly { return; } else { if(sel.selectedIndex> 0)//When the selected subscript is greater than 0, set the previous picture item to be selected. { sel.options[sel.selectedIndex-1].selected=true; } else{//If the subscript of the selected item is 0, set the last picture to be selected. sel.options[sel.length-1].selected=true; } ChangePic(sel.options[sel.selectedIndex].value);//Get the selected picture and change the The url is set to the corresponding image container.
//This method can be modified according to your own needs. } };
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