웹마스터 팁

일반 시간......

2006.10.10 22:12

김민환

<html>

<head>
<title>시간</title>
<meta name="generator" content="Namo WebEditor v4.0">
<script language="LiveScript">
function GoBack() {
if (confirm("Are you sure you want to go to the previous page?")) {
history.back()
}
}


timestr = "00:00:00";
tid = 0;
pause = 0;
var to;
var bcount;
var tcount;

function writer(){
document.write("test");
}

function time(n) {
tid=window.setTimeout("time(1)",to);
today = new Date()
if(today.getMinutes() < 10){
pad = "0"}
else
pad = "";
if(today.getSeconds() < 10){
pads = "0"}
else
pads = "";
timestr=today.getHours()+":"+pad+today.getMinutes()+":"+pads+today.getSeconds();
f.result.value = timestr;
window.status = timestr;
window.clearTimeout(tid);
tid=window.setTimeout("time()",to);
}

function start(x) {
f=x;
to=60;
time(x);
}

function cleartids() {
window.clearTimeout(tid);
}

</script>

</head>


<BODY onload="start(document.forms[0]);" onunload="cleartids();">


<form name="time">
<input type="text" name="result" size="11">
</form>
<p> </p>
</body>

</html>

추천 꽝!!
안해도됩니다^.^