current time is
<script>
function javascriptdatesettime()
{
var d=new Date();
var x=d.getHours()+":"+d.getMinutes()+":"+d.getSeconds()
document.getElementById('div1').innerHTML=x
setTimeout("javascriptdatesettime()",100)
}
</script>
<body>
<div id="div1" style="color:red;font-size:30;font-family:verdana">
current time is
</div>
<input type="button" value="javascript date set time" onclick="javascriptdatesettime()">
</body>
0 comments: