方法3:页面定时转向的JS代码。
代码:
这段body标签内的代码别忘了
<body onload="window.setTimeout('countDown(10)',1000);">
在 区域中添加以下代码:
<!-- Begin Auto Redirect Timer
// This Script Free To Use Providing This Notice Remains //
// This Script Has Been Provided Free By http://www.DesignerWiz.com //
// Development Resource & Javascript Public Archive Library //
// NOTICE: Though This Material May Have Been In A Public Depository Certain Author Copyright Restrictions May Apply //
-->
<script language="JavaScript" lang="JavaScript">
<!--
/*
Provided By http://www.DesignerWiz.com
Development Resource & JavaScript Public Archive Center
*/
function countDown(tick)
{
if (tick == 0)
{
window.location.href="http://www.panpan.org/"; //set your URL address here
return;
}
var time = "Transfer in ";
var minute = Math.floor(tick / 60);
if (minute < 10)
{
time += "0";
}
time += minute + ":";
var second = tick % 60;
if (second < 10)
{
time += "0";
}
time += second;
window.status = time;
--tick;
var command = "countDown(" + tick + ")";
window.setTimeout(command,100);
}
// -->
</script>