spacer.png, 0 kB
spacer.png, 0 kB
Home arrow Javascript arrow Javascript and page refresh
Javascript and page refresh PDF Print E-mail

The best way to manage HTML page refresh is to use Javascript code (different from the simple HTML based method).
In the following example however a meta-tag refresh will be used in case of non capable Javascript browser.
<html>
<head>

<noscript>
  <meta http-equiv="refresh" content="2">
</noscript>

<script language="Javascript">

  var url="http://www.alexdran.net/";

function ref(){
  setTimeout("refresh",2*1000);

}

function refresh(){
  window.location.href=url;
}

</script>
</head>

<body onload="ref()">

You will be redirect to AlexDran.net within two seconds

</body>
</html>
Last Updated ( venerd́, 30 novembre 2007 )
 
< Prev   Next >
spacer.png, 0 kB
spacer.png, 0 kB
spacer.png, 0 kB