<html> <head> <style type="text/css"> #div4e { width:160px; border:5px solid red; margin-left:auto; margin-right:auto; background-color:darkblue; color:white; font-weight:bold; font-size:40px; } </style> <script type="text/javascript"> function chas(){ var vreme= new Date(); var hh = vreme.getHours(); var mm = vreme.getMinutes(); var ss = vreme.getSeconds(); if( hh <=9 ) hh = "0"+hh; if( mm <=9 ) mm = "0"+mm; if( ss <=9 ) ss = "0"+ss; document.getElementById('div4e').innerHTML= hh+":"+mm+":"+ss; window.setTimeout("chas()",1000); } </script> <head> <body onLoad="chas()"> <div id="div4e"> </div> </body> </html>
HELP
Коментар