Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <head>
- <meta charset="utf-8" />
- <title>Clocks by MichiK</title>
- </head>
- <body>
- <script type="text/javascript">
- let d = new Date();
- if ((d.getHours() > 5) && (d.getHours() < 18))
- document.write("Good Day...");
- else
- document.write("Good evening");
- </script>
- <br>
- <script type="text/javascript">
- document.write("Loading...");
- function setDate(){
- document.body.innerHTML = "";
- let d = new Date();
- document.write("Today is: " + d.getDate() + ". " + (d.getMonth() + 1) + ". " + d.getFullYear());
- document.write("<br />");
- document.write("Time is: " + d.getHours() + ":" + (d.getMinutes()) + ":" + d.getSeconds());
- }
- setInterval(setDate, 1000);
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement