Just double-click on the time being shown in ur pc, at right-bottom. Here, below the clock picture, there is an editable textbox cum dropdown control being shown. From this control, the time can be changed... The mouse on "hh" and the "up" arrow will increase the hours, similarly the same happens for minutes and seconds.
I need to implement this control on a web page... can anyone help me?
Guest User3 pointsPosted Aug 27, 2007, 1:40 AM EDT
<html>
<head>
<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').value=h+":"+m+":"+s
t=setTimeout('startTime()',500)
}
function checkTime(i)
{
if (i<10)
{i="0" + i}
return i
}
</script>
</head>
<body onload="startTime()">
<input type="text" id="txt">
</body>
</html>