Basic HTML version of Foils prepared 3 March 99

Foil 21 "Hello World" Example (cont'd)

From Overview of JavaScript I -- Basic Web Scripting Language CPS616 Technologies of the Information Age -- Spring Semester 99. by Geoffrey C. Fox (Tom Scavo)

Simple scripts for Foil 21
There is only one JavaScript statement: document.writeln("<H1>Hello World!</H1>");
The writeln method writes its argument into the current document
The script is in the <BODY> since it writes HTML code into the document; other scripts are written in the <HEAD> so they are processed and available in body
  • Actually in advanced applications, when JavaScript is actually defined becomes quite tricky and is an example of how there are intrinsically undefined features in language
Scripts may be hidden from old browsers using arcane construct <SCRIPT LANGUAGE="JavaScript" > <!-- A comment to a dinosaur .... Bunch of Exciting JavaScript Statements ..... //script ends here --> </SCRIPT>



© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Wed Mar 3 1999