[java] 스크립트 – 시간이 지나면 다른 페이지로 로딩
스크립트 – 시간이 지나면 다른 페이지로 로딩
<SCRIPT LANGUAGE=”JavaScript”>
function startTimer(){
var time= new Date();
hours= time.getHours();
mins= time.getMinutes();
secs= time.getSeconds();
closeTime=hours*3600+mins*60+secs;
closeTime+=10;
Timer();
}
function Timer(){
var time= new Date();
hours= time.getHours();
mins= time.getMinutes();
secs= time.getSeconds();
curTime=hours*3600+mins*60+secs
if(curTime>=closeTime)
location = “i.html”
else
timeLeft();
}
function timeLeft(){
count = closeTime-curTime;
document.timer.counter.value = count + ” secs.”
window.setTimeout(“Timer()”,1000)
}
</SCRIPT>
3 Responses
3draughtsman
2whirlpool
… [Trackback]
[…] Information to that Topic: nblog.syszone.co.kr/archives/780 […]