Page redirect with JavaScript

http://stackoverflow.com/questions/503093/how-can-i-make-a-redirect-page-in-jquery-javascript#506004

by katalin_2003

HTML

<a onclick="window.location.href = '/';"> window.location.href = '/'; </a>
<a onclick="window.location.replace('/');"> window.location.replace('/'); </a>

CSS

a { color:#008; cursor:pointer; font-size:3em; display:block; margin:0 0 1em 0; }

JavaScript

// similar behavior as clicking on a link
    //window.location.href = "http://stackoverflow.com";

// similar behavior as an HTTP redirect
    //window.location.replace("http://stackoverflow.com");