<html>
<head>
<title>JS_programming</title>
<script type='text/javascript'>
var day=11;
if(day<=7)
{
document.write("<h2>The Day of the week is:</h2>")
switch(day)
{case 1:
document.write("<h2>SUNDAY</h2>")
break;
case 2:
document.write("<h2>MONDAY</h2>")
break;
case 3:
document.write("<h2>TUESDAY</h2>")
break;
case 4:
document.write("<h2>WEDNESDAY</h2>")
break;
case 5:
document.write("<h2>THURSDAY</h2>")
break;
case 6:
document.write("<h2>FRIDAY</h2>")
break;
case 7:
document.write("<h2>SATURDAY</h2>")
}
}
else{
document.write("<h2>Invalid Input</h2>")
}
</script>
</head>
</html>
Comments
Post a Comment