html - 3 picture slide show javascript code, what's wrong? -


here current code, not work how tho. want cycle 3 pictures in slide show javascript code. have text/javascript file made , html written, problem in here, not in other files.

var step=1;     function slideit()     {         document.images.slide.src = eval("image"+step+".src");         if(step<2)             step++;          settimeout("slideit()",2500);          else if(step<3)             step++;          settimeout("slideit()",2500);          else             step=1;      }     slideit(); 

all appreciated!

and more, if wish slide each 1 should use setinterval instead of settimeout because settimeout sum total timeouts , task single time


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -