qq_小白_7
2015-06-30 10:23
<!DOCTYPE html>
<html>
<head>
<title>浏览器对象</title>
<meta http-equiv="Content-Type" content="text/html; charset=gkb"/>
</head>
<body>
<p>操作成功</p><br>
<span id="qwer">5</span>秒后返回主页
<a href="javascript:back();">返回</a>
<script type="text/javascript">
var i=5;
function app(){
var b=document.getElementById("qwer")
i--;
b.innerHTML=i;
if(i==0){
window.location.href="http://www.baidu.com";}
}
setInterval(app,1000)
function bpp(){
window.history.back()}
}
</script>
</body>
</html>
24行代码有问题
charset=gkb改成charset=gb2312或者utf-8就不乱码了
JavaScript进阶篇
469182 学习 · 22584 问题
相似问题