Welcome aboard! We are happy you are here and wish you good net-raft!
<!DOCTYPE html>
<html>
<head>
</head>
<body onload="today()">
<div id="day"></div>
<script type="text/javascript">
function today() {
var txt;
switch (new Date().getDay()) {
case 0:
txt="Sunday";
break;
case 1:
txt="Monday";
break;
case 2:
txt="Tuesday";
break;
case 3:
txt="Wednesday";
break;
case 4:
txt="Thursday";
break;
case 5:
txt="Friday";
break;
case 6:
txt="Saturday";
break;
}
document.getElementById("day").innerHTML = "Today is " + txt;
}
</script>
</body>
</html>
The most helpful JAVASCRIPT solutions
How can I get the last day and the next day in javascript ?JAVASCRIPT Click to see more ... 5.8K 507