<!DOCTYPE html>
<html>
<body>
<p id="demo"></p>
<script>
var day;
switch (new Date().getDay()) {
case 0:
day = "Sunday";
break;
case 1:
day = "Monday";
break;
case 2:
day = "Tuesday";
break;
case 3:
day = "Wednesday";
break;
case 4:
day = "Thursday";
break;
case 5:
day = "Friday";
break;
case 6:
day = "Saturday";
break;
}
document.getElementById("demo").innerHTML = "Today is " + day;
</script>
</body>
</html>
PLEASE GIVE ME COMMENTS!!!
COMMENT IS VERY HELPFUL FOR ME.
PLEASE ADD 'How 2 Code' TO YOUR FAVORITE!!!.
댓글 없음:
댓글 쓰기