|
Head Section
Script tags are most often found in the Head section.
Functions, more complex scripts, and defining
external scripts (.js) are put in the Head Section. |
<head>
<title>My JavaScript Notes</title>
<Script Language=Javascript Type="Text/Javascript">
<!-- Hide Script from old browsers
/*This defines a script comment*/
// End hiding Script from old beowsers -->
</Script>
</head> |
|
Body Section
Scripts that write text to the screen, or write HTML are best put
in the Body section. |
<body>
<Script Language=Javascript Type="Text/Javascript">
document.write("<B>Hello, world!</B.")
</Script>
</body> |