Html 代码 :<Meta http-equiv="Refresh" Content="3; Url=http://www.baidu.com">
JS代码:
<script language="javascript">
var nn = 2;
function num()
{
document.getElementById("nuber").innerHTML = nn;
nn --;
}
function SetNum()
{
setInterval("num()",1000);
}
</script>
Html :<p>操作完成,<span id="nuber" style="color:#FF0000;">3</span>秒后返回...</p>
详细操作过程:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<Meta http-equiv="Refresh" Content="3; Url=http://www.baidu.com">
<title>无标题文档</title>
<script language="javascript">
var nn = 2;
function num()
{
document.getElementById("nuber").innerHTML = nn;
nn --;
}
function SetNum()
{
setInterval("num()",1000);
}
</script>
</head>
<body onLoad="SetNum();">
:<p>操作完成,<span id="nuber" style="color:#FF0000;">3</span>秒后返回...</p>
</body>
</html>