Trio ȨÆäÀÌÁö Ä«¿îÆ® ´Ù¿î ¿¹Á¦ Javascript ¿¹Á¦ ¸ÞÀÎÆäÀÌÁö


ObjectName.innerHTML
ºÐ ÃÊ
 
HTML Code
<head> <!-- °¨Ãã var now = new Date(); var minute = now.getMinutes().toString(); var second = now.getSeconds().toString(); minute = 1; second = 00; end=0; function timeclock(){ if(second == 00) { minute = minute - 1 ; second = 60 ; } else{ second = second-1; } if ((minute < 0) && (end==0)) { alert('Ä«¿îÆ® ´Ù¿î Á¾·á'); end=1; display.innerHTML='<font color=blue>Ä«¿îÆ®´Ù¿îÀº Á¾·áµÇ¾ú½¿.</font>'; } document.clock.txtMins.value = minute; if (second < 10) { document.clock.txtSecs.value = 0 + second.toString(); } else { document.clock.txtSecs.value = second; } setTimeout("timeclock()", 1000); } // °¨Ãã ³¡ --> </script> <style> input{text-align:right; padding-right:.5em;} </style> </head>
<body> .. <table><tr><td> <form name=clock> <input name=txtMins size=2>ºÐ <input name=txtSecs size=2>ÃÊ </form> <div id='display'> </div> <script>timeclock()</script></td></td> </table> .. </body>

¹ø¿ª¹® ¼ÒÀ¯ÀÚ - Trio ȨÆäÀÌÁö Á¦°ø ÀÌ ¹®¼­(http://trio.co.kr/webrefer/jsex/xcountdown.html)´Â
ÀÚÀ¯·ÎÀÌ ¿¬°á »ç¿ëÀÌ °¡´ÉÇÔ.
¿¹Á¦ ¸Þ´º·Î