<!DOCTYPE html>
<html>
<body>
<script>
function compuhelp()
{
var n;
n=parseInt(prompt("Enter The Number"));
switch(n)
{
case 1:
alert("Sunday");
break;
case 2:
alert("Monday");
break;
case 3:
alert("Tuesday");
break;
case 4:
alert("Wednesday");
break;
case 5:
alert("Thursday");
break;
case 6:
alert("Friday");
break;
case 7:
alert("Saturday");
break;
default:
alert("Wrong Input");
}
}
</script>
<p>Click one of the buttons to call a function</p>
<button onclick="compuhelp()">Click Here</button>
</body>
</html>
Click one of the buttons to call a function