Cool Disk's

  
 Helping the Spread of Knowledge & Skill's...

Proud Member of the EyeTweaks Network

Java   
   Batch

HTML

Java

VB

  

Special Thanks to Ours Sponsor's
How to become a sponsor

Display Time in Java

<script language="JavaScript">

<!--

var timerID = null;

var timerRunning = false;

function showtime()

{

var now = new Date();

var hours = now.getHours();

var tm = " AM";

if (hours == 12) { tm = " PM"; }

 

if (hours < 12) { tm = " AM"; }

if (hours > 12) { hours = hours - 12; tm = " PM"; }

if (hours == 0) { tm = " AM"; hours = 12; }

 

var minutes = now.getMinutes();

var seconds = now.getSeconds();

var timeValue = "" + hours;

timeValue += ((minutes < 10) ? ":0" : ":") + minutes;

timeValue += ((seconds < 10) ? ":0" : ":") + seconds;

LocalTimer.innerHTML = timeValue + tm;

timerID = setTimeout("showtime()",1000);

timerRunning = true;

}

//-->

</script>

 

Member of the EyeTweaks Network, We just keep on Tweaken!TM
CoolDisks.com All copyrights apply.(C)

Contact Us