Hi there,
I am new on javascript section. Just have started to learn javascript. I am trying to coding to show date and day......
here is the code I have created. It is showing only Wednesday when I am refreshing browser.
Is there any wrong I have made? will you check please
<html>
<head><title>Date Select</title>
</head>
<body>
<script type="text/javascript">
var date=new Date();
var day=date.getDay();
if (day==0)
{
window.document.write("Sunday");
}
else if (day==1)
{
window.document.write("Monday");
}
else if (day==2)
{
window.document.write("Tuesday");
}
else if (day==3)
{
window.document.write("Wednesday");
}
else if (day==4)
{
window.document.write("Thursday");
}
else if (day==5)
{
window.document.write("Friday");
}
else if (day==6)
{
window.document.write("Saturday");
}
</script>
</body>
</html>
I am waiting for your reply

Thanks in advance
