Embedding JavaScript into Web pages

From Techotopia
Revision as of 19:28, 9 April 2007 by Neil (Talk | contribs) (New page: Now that we have looked at the history of JavaScript and tried some simple example JavaScript code it is time to explore the mechanisms for including JavaScript into web pages. = The <scr...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Now that we have looked at the history of JavaScript and tried some simple example JavaScript code it is time to explore the mechanisms for including JavaScript into web pages.

The <script> element

JavaScript is embedded into HTML and XHTML documents using the <script> element. This element can be used to embed the javaScript directly into the web page, or to specify an external file that contains the JavaScript.