<!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" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Document</title>
</head>
<body>
<p>操作成功</p>
<span id="shuzi">5</span>
<span>秒钟跳转</span>
<a href="javascrip:goback()">back</a>
<script type="text/javascript">
var number=document.getElementById("shuzi").innerHTML;
function count(){
number--
document.getElementById("shuzi").innerHTML=number
if(number==0){
location.assign("http://www.baidu.com")
}
}
setInterval("count()",1000)
function goback(){
window.history.back();
}
</script>
</body>
</html>
李晓健
相关分类