62 lines
1.1 KiB
Plaintext
62 lines
1.1 KiB
Plaintext
|
<!DOCTYPE html>
|
||
|
|
||
|
<head>
|
||
|
<meta charset="utf-8">
|
||
|
<style>
|
||
|
body{
|
||
|
background-color: #2E4172;
|
||
|
color: #B4C0DE;
|
||
|
font-style: normal;
|
||
|
font-family: sans-serif;
|
||
|
font-size: 50px;
|
||
|
}
|
||
|
#answer{
|
||
|
width: 1087px;
|
||
|
margin:250px auto auto auto;
|
||
|
}
|
||
|
</style>
|
||
|
<script>
|
||
|
|
||
|
function datbarCheck()
|
||
|
{
|
||
|
|
||
|
var d = new Date();
|
||
|
var n = d.getDay();
|
||
|
var t = d.getTime();
|
||
|
|
||
|
var hours = d.getHours();
|
||
|
var minutes = d.getMinutes();
|
||
|
|
||
|
var weekday = new Array(7);
|
||
|
weekday[0]= "Søndag";
|
||
|
weekday[1] = "Mandag";
|
||
|
weekday[2] = "Tirsdag";
|
||
|
weekday[3] = "Onsdag"
|
||
|
weekday[4] = "Torsdag";
|
||
|
weekday[5] = "Fredag";
|
||
|
weekday[6] = "Lørdag";
|
||
|
|
||
|
var answer = document.getElementById("answer")
|
||
|
|
||
|
if (n == 5)
|
||
|
{
|
||
|
answer.innerHTML = "Baren skulle være åben fra klokken 15:00!";
|
||
|
}
|
||
|
|
||
|
else
|
||
|
{
|
||
|
answer.innerHTML = "Baren er desværre ikke åben, da det er " + weekday[n] + " og klokken er " + hours + ":" + minutes;
|
||
|
}
|
||
|
}
|
||
|
</script>
|
||
|
</head>
|
||
|
<body onload="datbarCheck();">
|
||
|
|
||
|
<div id="print"></div>
|
||
|
<div id="answer"></div>
|
||
|
|
||
|
|
||
|
</body>
|
||
|
|
||
|
</html>
|