//一个跳转提示页面
<script type="text/javascript">
var s=5;
function go(){
document.getElementById("chan").innerHTML=s;
s=s-1;
if (s==0){
window.location.href="http://www.imooc.com/";
}
window.setTimeout(go,1000);
}
go();
function goBear(){
window.history.back();
}
</script>
<h3>操作成功</h3>
<p><span id="chan">5</span>秒后返回到主页<a href="http://www.imooc.com/" onclick="goBear()" >返回</a></p>