Re-direction of html using javascript

I have a html file with a link to another html file. I need that after i press the link to the second html, that second html would redirect to a third html file automatically.
I want to know what java script could i use and how i implement it in that second html file.
Hope i made myself clear!!!
thanks a lot!!