-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathindex.html
More file actions
55 lines (44 loc) · 1.62 KB
/
index.html
File metadata and controls
55 lines (44 loc) · 1.62 KB
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
47
48
49
50
51
52
53
54
55
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="myStyle.css">
<title>Clock</title>
</head>
<body class="clock-body">
<div class="clock-box">
<!-- <div class="headers">
<h1>Time</h1>
</div> -->
<div class="time">
<script>
let a
let time
let date
setInterval(() => {
a = new Date()
date = a.toLocaleDateString()
let b= a.getHours();
let c= a.getMinutes();
let d=a.getSeconds();
time = a.getHours() + ":" + a.getMinutes() + ":" + a.getSeconds()
document.getElementById('time').innerHTML = time + "<br>Date: " + date
}, 1000);
</script>
</div>
<div class="container">
<div class="jumbotron">
<h1 class="display-4">Time: <span id="time"></span> </h1>
</p>
</div>
</div>
</body>
</html>