<!DOCTYPE HTML>
<HTML>
<BODY>
<SCRIPT type="text/javascript">
var day="3";
switch(day)
{
case "1":
alert("Day is Monday");
break;
case "2":
alert("Day is Tuesday");
break;
case "3":
alert("Day is Wednesday");
break;
case "4":
alert("Day is Thursday");
break;
case "5": alert("Day is Friday");
break;
case "6": alert("Day is Saturday");
break;
case "7": alert("Day is Sunday");
break;
default: alert("Not a valid number");
break;
}
</SCRIPT>
</BODY>
</HTML>
<HTML>
<BODY>
<SCRIPT type="text/javascript">
var day="3";
switch(day)
{
case "1":
alert("Day is Monday");
break;
case "2":
alert("Day is Tuesday");
break;
case "3":
alert("Day is Wednesday");
break;
case "4":
alert("Day is Thursday");
break;
case "5": alert("Day is Friday");
break;
case "6": alert("Day is Saturday");
break;
case "7": alert("Day is Sunday");
break;
default: alert("Not a valid number");
break;
}
</SCRIPT>
</BODY>
</HTML>
No comments:
Post a Comment