»
EnglishFrenchVietnamese

Print - Dynamic Timed Redirect - JavaScriptBank.com

Full version: jsB@nk » Snippet » Dynamic Timed Redirect
URL: http://www.javascriptbank.com/dynamic-timed-redirect.html

Dynamic Timed Redirect © JavaScriptBank.comRedirect the user to a different Web page after a designated number of seconds, while displaying a countdown in the document title representing the number of seconds left before redirection.

Full version: jsB@nk » Snippet » Dynamic Timed Redirect
URL: http://www.javascriptbank.com/dynamic-timed-redirect.html



JavaScript
<script>// Created by: Jon Brown :: http://allthingsrunescape.freewebs.comvar c=5;var t;function timedCount() {  document.title='JavaScriptBank.com | Redirecting in ' + c + ' seconds';  c=c-1;  t=setTimeout("timedCount()",1000);  if (c==-1) {    clearTimeout(t);    document.title='Redirecting ...';    alert( 'Sampled by JavaScriptBank.com' );    self.location="http://www.javascriptbank.com/newPage.html";  }}window.onload=timedCount;</script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->