Placing the following JavaScript code in a web page will cause it to automatically redirect to the address provided in the code.

 

If you need to redirect the parent page of an iframe you could use something like the following code.