Pages

basic clock


this code for a time basic clock

<div style="color:#FF0000;font-size:12px;font-family:Arial;font-weight:normal;font-style:normal;text-decoration:none" id="basicclock"></div>



<script type="text/javascript">

function clock()

{

var digital = new Date();

var hours = digital.getHours();

var minutes = digital.getMinutes();

var seconds = digital.getSeconds();

if (minutes <= 9) minutes = "0" + minutes;

if (seconds <= 9) seconds = "0" + seconds;

dispTime = hours + ":" + minutes + ":" + seconds;



var basicclock = document.getElementById('basicclock');

basicclock.innerHTML = dispTime;

setTimeout("clock()", 1000);

}

clock();

</script>



                                                              mohamed basha 

0 comment:

إرسال تعليق

Link With in

Related Posts Plugin for WordPress, Blogger...