DarkKnight
Reputable
All right, for anyone willing and able to help me with this, I would much appreciate it...
I have managed to experiment with JavaScript enough that I have been able to create a clock for my webpage.
Unfortunately, however, I would like to add an enlarged font size, and a font color to the JavaScript clock, and I do not know how.
*CODE*
I have managed to experiment with JavaScript enough that I have been able to create a clock for my webpage.
Unfortunately, however, I would like to add an enlarged font size, and a font color to the JavaScript clock, and I do not know how.
*CODE*
Code:
<script type="text/javascript">
function startTime()
{
var today=new Date();
var h=today.getHours();
var m=today.getMinutes();
var s=today.getSeconds();
// add a zero in front of numbers<10
m=checkTime(m);
s=checkTime(s);
document.getElementById('txt').innerHTML=h+":"+m+":"+s;
t=setTimeout('startTime()',500);
}
function checkTime(i)
{
if (i<10)
{
i="0" + i;
}
return i;
}
</script>
<body onload="startTime()">
<div id="txt"></div>
</noscript>







