Javascript language

How to show Day of Week
Previous Home Next

Step 1. Written below code in your application.

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

Step 2. Run the Application. Click on Button.

Previous Home Next