Using a Timer in Javascript
In my previous project Changing Image Source, we change images by clicking. But what if we want to change them automatically and continuously? We have to use a timer on it. With just few lines of codes added in our previous project, we can make it work. var timer = setInterval('changeImg()', 3000); We will use setInterval method. Inside of it is the 2 arguments. First is the code that you want to
- Read more about Using a Timer in Javascript
- Log in or register to post comments
- 48 views