qq_谁_15
2018-10-13 21:38
<!DOCTYPE html>
<html>
<head>
<title>浏览器对象</title>
<meta http-equiv="Content-Type" content="text/html; charset=gkb" />
<style type="text/css">
</style>
</head>
<body>
<h4>操作成功</h4>
<p><span id="time">5</span>秒后回到主页<a href="javascript:history.back()">返回</a></p>
<script type="text/javascript">
var num = document.getElementById("time").innerHTML
var i = setInterval("if(num > 1){document.getElementById('time').innerHTML = --num;}else{location.assign('http://www.imooc.com');}", 1000);
</script>
</body>
</html>
可以呀
JavaScript进阶篇
468192 学习 · 21891 问题
相似问题