Javascript language

adplus-dvertising
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