-
Notifications
You must be signed in to change notification settings - Fork 0
/
Happy.html
39 lines (36 loc) · 1.19 KB
/
Happy.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
<!DOCTYPE html>
<html>
<head>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f0f0f0;
text-align: center;
padding-top: 15%;
}
.new-year-message {
font-size: 3em;
color: #333;
}
</style>
</head>
<body>
<div id="message" class="new-year-message"></div>
<script>
var year = new Date().getFullYear() + 1; // Obtenez l'année suivante
var message = document.getElementById('message');
function updateMessage() {
var now = new Date();
if (now.getFullYear() === year) {
message.innerHTML = "junior gerome : en tant que developpeur je ne peut que vous souhaite a maniere a tous un Happy New Year " + year + "!";
} else {
var timeLeft = new Date(year, 0, 1) - now;
var secondsLeft = Math.floor(timeLeft / 1000);
message.innerHTML = "junior gerome je vous reserve une suprise Il reste " + secondsLeft + " secondes jusqu'à " + year + "!";
}
}
setInterval(updateMessage, 1000);
updateMessage();
</script>
</body>
</html>