In the above code, we:
- Create a reference to the iframe (<iframe id=”frame1″></iframe>).
- Create the delay. Time is tracked in milliseconds (1000 = 1 second).
- Start the interval, and store a reference to it.
The iframe will be reloaded every 10 seconds. If we want to stop the reloading, we do this: