Commit 26f69a7b authored by satvikmashkaria's avatar satvikmashkaria

satvik clock

parent 11dab9d9
<!DOCTYPE html>
<!DOCTYPE html>
<html>
<head>
<title>Get time</title>
</head>
<body>
<style>
p{
font-size: 50px;
}
</style>
<p id="time" align="center"></p>
<script>
setInterval(timefun,1000);
function timefun(){
var d=new Date();
var hrs=d.getHours();
var mins=d.getMinutes();
var secs=d.getSeconds();
var final=hrs+":"+mins+":"+secs;
document.getElementById('time').innerHTML = final;
}
</script>
</body>
</html>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment