代碼可以跑起來:)
<!DOCTYPE?html>
<html?lang="en">
<head>
????<meta?charset="UTF-8">
????<meta?name="viewport"?content="width=device-width,?initial-scale=1.0">
????<meta?http-equiv="X-UA-Compatible"?content="ie=edge">
????<title>Document</title>
</head>
<body>
????<h1>操作成功</h1>
????<span>5</span>
????<span>秒后回到主頁?</span>
????<span><input?type="button"?id="back"?value="返回"?/></span>
????<script?type="text/javascript">
????????var?c?=?5;
????????function?count()?{
????????????document.querySelectorAll("span")[0].innerHTML?=?c;
????????????--c;
????????????if?(c?==?0)?{
????????????????window.open("http://idcbgp.cn/",?"_blank");
????????????}
????????????window.setTimeout("count()",?1000);
????????}
????????count();
????????document.querySelector("#back").addEventListener("click",?function?()?{?window.history.go(-1);?},?true);
????</script>
</body>
</html>
2019-10-13
566666