Copy code The code is as follows: "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> ; auto play < script type="text/javascript" src="../jquery-1.8.0.min.js" /> <br> //The first item in the array is the duration, other items can be customized <br> data = [["3","a"],["2","b"],["3","c"] ,["2","d"],["1",""]]; <br><br> $(document).ready(function(){ <br> //Set trigger event<br> autoPlay .run = function(obj,num){ <br> ){ <br> if(autoPlay.num ==undefined) <br> autoPlay.num = 0; <br> //Initialization time point<br> if(autoPlay.timepoint ==undefined) <br> autoPlay.timepoint = new Date(). getTime(); <br> if(autoPlay.num<data.length){ <br> //Function handle, data array, autoPlay.num current subscript <br> autoPlay.run(data,autoPlay.num); <br> ==undefined) <br> autoPlay.first = true; <br> else <br> autoPlay.num; <br> //Set the next playback time <br> autoPlay.timepoint = (data[autoPlay.num] [0]*1000); <br> <br> var defaults = {inteval:500}; <br> }}); <br><br> < div id="div_show">