Results 1 to 2 of 2

Thread: clock

  1. #1
    harish Guest

    Default clock

    I want a client side script(javascript) such that I must be able to show the current time (seconds and minutes changing) on my browser.

  2. #2
    Bruno Santos Guest

    Default RE: clock

    Hi harish!!<BR><BR>I wanted too! I also think everyone should have their personal web clocks... :)<BR>That is why I have built one.<BR><BR>You need to create a variable to receive the "new Date()" value, and then access its parts - getHours(), getMinutes(), getSeconds().<BR><BR>The only trick there is to format the date (time) parts into two digits, because by default the numbers below ten waste - and occupy - only one digit.<BR><BR>There is a page with the clock, not ticking, but still working at:<BR>&nbsp;&nbsp;&nbsp;<BR><BR>Bruno (<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts