刷新代码用什么好啊?高手进
我用的是以下的代码,发现不怎么好用!有其他的代码吗?
<!--自动刷新页面[该代码根据自定义的时间不停的刷新页面]
====1、将以下代码加入HEML的<body></body>之间:--->
<meta http-equiv="refresh" content="8;url=/ybbc/index.asp">
问题点数:100、回复次数:8Top
1 楼aloxy(爱上牛肉面)回复于 2003-08-03 21:33:20 得分 0
<%
Response.Redirect("ybbc/index.asp")
%>
看看行不Top
2 楼cloudchen(cloudchen)回复于 2003-08-03 21:33:32 得分 20
<meta http-equiv="refresh" content="5">
每秒钟刷新一次,加在head里面比较好,body也可以Top
3 楼wssgwps(凸(-_-)凸)回复于 2003-08-03 21:40:17 得分 0
Try;
<script>
setInterval(location.reload(),2000);
</script>Top
4 楼fengchu2(凤雏)回复于 2003-08-03 21:48:51 得分 20
一般情况下,
<meta http-equiv="refresh" content="8;url=/ybbc/index.asp">
url=当前页
按照你的写法,请你在/ybbc/index.asp 中加入如下代码:
<meta http-equiv="refresh" content="8;url=index.asp">
Top
5 楼ghjhot(花落满地)回复于 2003-08-03 22:11:09 得分 30
<script>
<!--
var limit="2:00"
'2分钟刷新一次
if (document.images){
var parselimit=limit.split(":")
parselimit=parselimit[0]*60+parselimit[1]*1
}
function beginrefresh(){
if (!document.images)
return
if (parselimit==1)
window.location.reload()
else{
parselimit-=1
curmin=Math.floor(parselimit/60)
cursec=parselimit%60
if (curmin!=0)
curtime=curmin+"分"+cursec+"秒后重刷本页!"
else
curtime=cursec+"秒后重刷本页!"
window.status=curtime
setTimeout("beginrefresh()",1000)
}
}
window.onload=beginrefresh
//-->
</script>Top
6 楼yanfeng(烟峰)回复于 2003-08-04 08:02:09 得分 0
<input onclick=window.location.reload() type=button value=刷新 name=refresh>Top
7 楼superdullwolf(超级大笨狼,每天要自强,MVP)回复于 2003-08-04 15:35:42 得分 30
<SCRIPT LANGUAGE=vbs>
aaa
sub aaa
dim MyHour
dim MyMinute
dim MySecond
MyHour=int(hour(time))
MyMinute=int(Minute(time))
MySecond=int(Second(time))
if MyHour=10 then
if MyMinute=0 then
if MySecond=0 then
window.location.reload
end if
end if
end if
window.setTimeout "aaa",1000
end sub
</SCRIPT>
Top




