Switch prom
Dear Sir,
I have type this code, but i did get proper answer.
so please tell where is problems.
<html>
<head><title> switch statement</title>
<Script language="JavaScript">
Age = document.frmOne.cmbAge.value
switch (Age) {
case "1":
alert("still at school")
break
case "2":
alert("still young")
break
case "3":
alert("start lying")
break
case "4":
alert("start saving")
break
default:
alert("undetermined")
}
</script>
</head>
<body>
<form name=frmOne>
<select name = cmbAge>
<option value = 1>5 to 16</option>
<option value = 2>17 to 30</option>
<option value = 3>31 to 45</option>
<option value = 4>46 </option>
</select>
</form>
</body>
</html>