3 Replies - 1717 Views - Last Post: 20 April 2012 - 11:16 AM

#1 BetaWar  Icon User is offline

  • #include "soul.h"
  • member icon

Reputation: 1484
  • View blog
  • Posts: 8,203
  • Joined: 07-September 06

Live clock

Posted 08 December 2006 - 04:54 AM

Description: Simply put this code wherever you want the clock to be in your page.A simple live clock in Javascript, cross-browser compatable.
<script language="Javascript">
function GetTime() {
window.setTimeout( "GetTime()", 1000 );
LiveTime = new Date()
document.all.time.innerHTML=LiveTime;
}
GetTime();
</script>
<code id="time">The Time, Date and Year</code>


Is This A Good Question/Topic? 0
  • +

Replies To: Live clock

#2 Koolack  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 0
  • Joined: 10-September 08

Re: Live clock

Posted 10 September 2008 - 10:08 PM

ok so here is my issue this is my live clock but i can't for the life of me how to make so the mins are different for ex. i want Hawaii and Korea to have different mins but still keep time does anyone know how to do that?

Hawaii

Pacific

Eastern

Zulu

Iraq

Korea

Okinawa


Was This Post Helpful? 0
  • +
  • -

#3 borninlyoko  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 7
  • View blog
  • Posts: 350
  • Joined: 03-December 09

Re: Live clock

Posted 20 April 2012 - 10:54 AM

May I ask why you used document.all instead of document.getElementById?
Was This Post Helpful? 0
  • +
  • -

#4 BetaWar  Icon User is offline

  • #include "soul.h"
  • member icon

Reputation: 1484
  • View blog
  • Posts: 8,203
  • Joined: 07-September 06

Re: Live clock

Posted 20 April 2012 - 11:16 AM

Well, I can't say for sure, it was written about 6 years ago. But it was either that at the time I didn't know about document.getElementById, or I was being lazy (document.all saves characters).
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1