我来自荷兰,我在学校。我有约会,但现在我要显示该日期的工作日。
<!DOCTYPE html>
<html>
<head>
<script>
function getWeekday(d) {
alert (d);
var date = new Date();
var weekday = new Array(7);
weekday[0] = "Zondag";
weekday[1] = "Maandag";
weekday[2] = "Dinsdag";
weekday[3] = "Woensdag";
weekday[4] = "Donderdag";
weekday[5] = "Vrijdag";
weekday[6] = "Zaterdag";
}
function d() {
document.getElementById("Weekdag").innerHTML = getWeekday ("2050-01-01");
}
</script>
</head>
<body>
<p>Laat een weekdag zien</p>
<button onclick="d()">Klik voor weekdag</button>
<p id="Weekdag"></p>
</body>
</html>