Javascript language

How to show Day of Week
Previous Home Next

Step 1. Written below code in your application.

<html>
<script language="javascript">
function get_day()
{
    var getDay=new Date();
    if(getDay.getDay()>0 && getDay.getDay()<6)
    {
    alert("Its a Week Day");
    }
    else
    {
    alert("Its Week End!!!")    }
}
</script>
<body>
<input type="button" onclick="get_day()" value="Show Day" />
</body>
</html>

 

Step 2. Run the Application. Click on Button.

Previous Home Next

Tolal:0 Click:

Show All Comments

Did not find what you were looking for leave your name and message. We will revert within 24 hours
Name:
eMail:
Comment / Feedback: