can anyone help out with java source code for a simple analog and digital clock? like a simple clock with moving hrs,mins and secs arm, also a digital clock
NOTE: Below code is not tested. <script type="text/javascript"> function showTime () { var now = new Date(); var timeString = now.getHours + ":" + now.getMinutes() + ":" + now.getSeconds; document.getElementById("clock").firstChild.data = timeString; setTimeout("showTime()", 1000); } window.onload = showTime; </script> <div id="clock">00:00:00</div> Code (markup):