달력

52024  이전 다음

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31


<SCRIPT>
var i=0;
function clockF()
{
    today = new Date() ;
    
    i=i+1000;
    servertime=<?=time()?>*1000;
    processtime=servertime+i;
    today.setTime(processtime);

    document.loginfrm.clock.value = today.getYear() + "-" + (today.getMonth()+1) + "-" + today.getDate() + "  "+today.getHours() + ":" + today.getMinutes() + ":" + today.getSeconds();
//상단의 .toString().slice(-3,-1)는 (JavaScript 1.3) (JScript 3.0) 에서 today.getMiliseconds() 로 표시될수 있습니다.
}
setInterval('clockF()' , 1000) ;
</script>
<?
echo ("<table width=\"195\" align=center border=\"0\" cellspacing=\"0\" cellpadding=\"0\" bordercolorlight=#C6CFCE bordercolordark=white>
<tr>
<td height=5></td>
</tr>
<tr><form name=\"loginfrm\">
<input type=text name=clock size=22 style=\"text-align:center;border:none;color:#2080A8\" readonly></td>
</tr></form>
</table>");
?>

 

'Dev Language > JAVASCRIPT' 카테고리의 다른 글

달팽이 for문  (0) 2015.02.24
숫자 야구  (0) 2015.02.24
기본 Text 에디터  (0) 2015.02.24
스톱워치  (0) 2015.02.24
키보드 키 값 알아내기  (0) 2015.02.24
Posted by 타카스 류지
|