In javascript Browser redirection can be done in 3 ways:
1) Alert Redirect:
CODE
<html>
<script>
alert("This page has been moved to a new location... click OK to be redirected.");
location = "http://www.your-website.com";
</script>
</html>
2) Confirm and Redirect:
CODE
<html>
<script>
if(confirm("This page has been moved to a new location... would you like to be redirected"))
{
location = "http://www.your-website.com";
}
else
{
history.back();
}
</script>
</html>
3) Stealth Redirect:
CODE
<html>
<script>
location = "http://www.your-website.com";
</script>
</html>
Bye
1) Alert Redirect:
CODE
<html>
<script>
alert("This page has been moved to a new location... click OK to be redirected.");
location = "http://www.your-website.com";
</script>
</html>
2) Confirm and Redirect:
CODE
<html>
<script>
if(confirm("This page has been moved to a new location... would you like to be redirected"))
{
location = "http://www.your-website.com";
}
else
{
history.back();
}
</script>
</html>
3) Stealth Redirect:
CODE
<html>
<script>
location = "http://www.your-website.com";
</script>
</html>
Bye
