<!-- <script>
setTimeout(function () {
window.location.href = 'http://ittutorial.in/'; // the redirect goes here
},300);
</script>
//-->
<script type="text/javascript">
/* if(error == true){
// Your application has indicated there's an error
window.setTimeout(function(){
// Move to a new location or you can do something else
window.location.href = "https://www.ittutorial.in";
}, 5000);
//} */
</script>
<script type="text/javascript">
function Redirect()
{
window.location="http://www.ittutorial.in";
}
document.write("You will be redirected to a new page in 5 seconds");
setTimeout('Redirect()', 300);
</script>
<script language=javascript>
function redirect(){
window.location = "http://ittutorial.in";
}
</script>
<body onload="redirect()">
</body>
Redirect page when click on button
<script>
// onclick event is assigned to the #button element.
document.getElementById("button").onclick = function() {
window.location.href = "http://www.ittutorial.in";
};
</script>
The above code will do the redirection when the user clicks the #button element.