|
JavaScript is a programming language understood by web browsers.
Using a different set of commands a variety of effects can
be achieved by adding the code into the HTML of the web page.
Although
writing in JavaScript is not as difficult as it sounds, this
unit concentrates on pupils using ready prepared scripts that
are freely and easily available on the Internet.
These
scripts are copied and pasted in to the HTML head and body
of the web page. Most free JavaScript sites give instructions
as to how they should be used.
Suggest
to pupils that they use ONE JavaScript per web page otherwise
they will conflict with each other. Pupils who wish to add
more than one JavaScript to a page must be shown how to do
this. The following is one of many Internet pages showing
how this can be achieved.
http://www.javascriptkit.com/javatutors/multiplejava2.shtml
Demonstrate
how to copy and paste JavaScript into an existing web page.
The
following example7a JavaScript code creates the current
date.
Example7b is the result displayed in a web browser.
Pupils
can visit Internet sites for 'Shareware or free JavaScript
code'. The following are some suggestions:
http://javascript.internet.com/
http://www.scriptsearch.com/JavaScript/Scripts/
http://hotwired.lycos.com/webmonkey/programming/javascript/
http://www.javascriptworld.com/scripts/index.html
http://www.javascriptkit.com/cutpastejava.shtml
|