|
Slide 11.b: JavaScript (cont.) Slide 11.d: JavaScript where to … Home |
|
<script> tag (also use the type attribute to define the scripting language).
So, the <script type="text/javascript"> and </script> tells where the JavaScript starts and ends.
|
|
By entering the document.write command between the <script> and </script> tags, the browser will recognize it as a JavaScript command and execute the code line.
|
|
<script> tag, the browser would have treated the document.write( document.referrer ) command as pure text, and just write the entire line on the page.