setTimeout ( expression, timeout );
Refreshing part of a page periodically
Divide the page using frames and load different pages in each frame as below:
In the above code, “right_frame” reloads every second. setInterval() function is very closely related to setTimeout() – both have similar syntax:
setInterval ( expression, interval );
The important difference is that, whereas setTimeout() triggers expression only once, setInterval() keeps triggering expression again and again (unless you tell it to stop). You can stop setInterval() by calling method clearInterval().