<!DOCTYPE html><html> <head> <title>浏览器对象</title> <meta http-equiv="Content-Type" content="text/html; charset=gkb"/> </head> <body><h1>操作成功</h1><span id="first">5</span><span>秒后返回到主页</span><a href="javascript:back();">返回</a><script type="text/javascript"> var num=document.getElementById("first").innerHTML; function con(){ num--; document.getElementById("first").innerHTML=num; if(num==0){ location.assign("www.imooc.com"); } } setInterval("con()",1000); function back() { window.history.back(); }</script></body></html>
添加回答
举报
0/150
提交
取消