This commit is contained in:
Villads Valur Korsholm Nielsen 2016-01-04 02:39:27 +01:00
commit 9603b9f6bd

61
erdatbarenaaben.dk Normal file
View File

@ -0,0 +1,61 @@
<!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>