JAVASCRIPT how get current day week javascript - Net-Raft.com

Welcome aboard! We are happy you are here and wish you good net-raft!




Just a Web Code Solution

How get current day of week using javascript ?


 230

Show ResultJAVASCRIPT


1

<!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>


By     Created   
The power of the user (%)
11%



The most helpful JAVASCRIPT solutions

How to get client machine name or computer name with javascript ?How to get client machine name or computer name with javascript ?JAVASCRIPT

Click to see more ...

  6.2K     388

get client hostname javascriptget client hostname javascriptJAVASCRIPT

Click to see more ...

  3.4K     271

detect ie javascriptdetect ie javascriptJAVASCRIPT

Click to see more ...

  2.2K     186

Create fireworks using javascriptCreate fireworks using javascriptJAVASCRIPT

Click to see more ...

  1.8K     146

create 3d barrel using javascriptcreate 3d barrel using javascriptJAVASCRIPT

Click to see more ...

  1.6K     103

create qr code javascriptcreate qr code javascriptJAVASCRIPT

Click to see more ...

  1K     99

how to create foreach class using javascript ?how to create foreach class using javascript ?JAVASCRIPT

Click to see more ...

  1.2K     97

fire event when user is idle javascriptfire event when user is idle javascriptJAVASCRIPT

Click to see more ...

  1.4K     97

get ip address javascriptget ip address javascriptJAVASCRIPT

Click to see more ...

  872     76

get filename using javascript get filename using javascript JAVASCRIPT

Click to see more ...

  639     62