Java Reference
In-Depth Information
case 1:
document.write("Too low!");
break;
case 2:
document.write("Too low!");
break;
case 3:
document.write("You guessed the secret number!");
break;
case 4:
document.write("Too high!");
break;
case 5:
document.write("Too high!");
break;
default:
document.write("You did not enter a number between 1 and 5.");
break;
}
document.write("<br />Execution continues here");
</script>
</body>
</html>
Load this into your browser and enter, for example, the value 1 in the prompt box. You should then see
something like what is shown in Figure 3-8.
figure 3-8  
Search WWH ::




Custom Search