只能在自己的瀏覽器上運行,這應(yīng)該算簡潔了吧
<!DOCTYPE html>
<html>
?<head>
? <title>瀏覽器對象</title>??
? <meta http-equiv="Content-Type" content="text/html; charset=gkb"/>? ?
?</head>
?<body onload="sec()">
? <!--先編寫好網(wǎng)頁布局-->
? <h3>操作成功</h3>
? <p><span id="aaa">5</span>秒后返回到主頁 <a href="#" onclick="goBack()">返回</a></p>
? <script type="text/javascript">??
?function goBack(){
? ? ?window.open("http://idcbgp.cn/");
?}
?var num=5;
?function sec(){
? ? ?if(num > 0){
? ? ? ? ?document.getElementById("aaa").innerHTML = num;
? ? ? ? ?num = num - 1;
? ? ? ? ?setTimeout("sec()",1000);
? ? ?}else{
? ? ? ? ?window.open("http://www.baidu.com/","_self");
? ? ?}
?}
?</script>?
</body>
</html>
2020-11-18
阿詩丹頓多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多