View Single Post
Old July 27th, 2011, 01:02 PM
Ashu2912 Ashu2912 is offline
Registered User
Join Date: Jul 2011
Posts: 4
Thanks: 3
Thanked 0 Times in 0 Posts
Default 1st Chapter Example 2

It is mentioned that the program is interpreted from top to bottom. However, there is some odd behaviour given by the code below :-

<title> Title 1 </title>
<script type = "text/javascript">
  alert ("Hi!!!");
  document.bgColor = "RED";
<title> Title 2 </title>
<body bgcolor = "YELLOW">
Hi!!! Again
<title> TITLE 2 </title>
I have mentioned the background colour to be yellow later in the program, but the webpage is being created red in colour, as mentioned in the <script>-</script> block!