-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
46 lines (44 loc) · 1.11 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<!DOCTYPE html>
<head>
<title> Dynamic Clock </title>
<style>
#showclock {
font-size: 40px;
color:wheat;
}
#showdates{
font-size: 54px;
color:wheat;
}
body{
width: 420px;
text-align: center;
margin-top: 314px;
margin-left: 650px;
background-color: black;
}
h1{
color:wheat;
}
</style>
</head>
<body>
<div class="Clock">
<h1>Thanks For Visting 😊</h1>
<p id="showdates"></p>
<p id="showclock"></p>
<script>
var d = new Date();
var n = d.toDateString()
document.getElementById("showdates").innerHTML=n;
</script>
<script type="text/javascript">
var clock = setInterval(clocktiming, 1000);
function clocktiming() {
var d = new Date();
var time = d.toLocaleTimeString();
document.getElementById("showclock").innerHTML = time;
}
</script>
</div>
</body>