Java Reference
In-Depth Information
</script>
<p>Paragraph 3</p>
</body>
</html>
Save the fi le to your hard drive as ch1_examp2.htm and then load it into your browser. When you load
the page, you should see the fi rst paragraph, Paragraph 1 , followed by a message box displayed by the
fi rst script block. The browser halts its parsing until you click the OK button. As you see in Figure 1-3,
the page background is white, as set in the <body> tag, and only the fi rst paragraph is displayed.
Figure 1-3
Click the OK button, and the parsing continues. The browser displays the second paragraph, and the
second script block is reached, which changes the background color to red. Another message box is dis-
played by the second script block, as shown in Figure 1-4.
Figure 1-4
Search WWH ::




Custom Search