Current Date and Time using Javascript...
HTML Code:
8)
<html>
<head><h1><center><font color="red">**********DISPLAYING DATE & TIME**********</font></h1>
<title>date and time</title>
<script>
function disp()
{
var i=new Date();
document.getElementById('dt').style.color='green';
document.getElementById('dt').innerHTML=i;
mytime=setTimeout("disp(),1000")
}
</script>
</head>
<body background="m.jpg" onLoad="disp()">
<span id="dt"></span>
</center>
</body>
</html>
<head><h1><center><font color="red">**********DISPLAYING DATE & TIME**********</font></h1>
<title>date and time</title>
<script>
function disp()
{
var i=new Date();
document.getElementById('dt').style.color='green';
document.getElementById('dt').innerHTML=i;
mytime=setTimeout("disp(),1000")
}
</script>
</head>
<body background="m.jpg" onLoad="disp()">
<span id="dt"></span>
</center>
</body>
</html>
Comments
Post a Comment