CCSU Spring 2001

Intermediate Java Script

JavaScript is a full featured object oriented programming language which is specifically designed to be used in creating DYNAMIC, INTERACTIVE Web Pages. These INTERMEDIATE JAVASCRIPT DEMOS teach you the boring text based stuff you need to use JavaScript well. They illustrate how to put up ALERT BOXES for simple output; how to put up CONFIRMATION BOXES and PROMPTS (perhaps they should be called prompt boxes) for simple input; how to DECLARE VARIABLES and ASSIGN VALUES to variables, how to use ARITHMETIC EXPESSIONS, how to use STRING ADDITION to concatenate strings of characters (run strings together to form a longer string of characters), how to ROUND NUMBERS OFF, UP and DOWN, and how to generate random numbers. They also include some real programs, for example the VENDING MACHINE and CASINO programs.

To run these demos, simply click on the links below. The demos will run on any of (in alphabetical order) Microsoft Internet Explorer version 4.0 or higher, Mozilla, or Netscape Navigator 4.0 or higher.

To learn how these demos work, you need to examine the source code. To view the source code, simply click on the links below. (Microsoft Internet Explorer will try to run the source code files as programs, and then you will have to click on "View Source" under the "Edit" menu to actually see the source code.) To save these demos in a runnable form for later use, save the source code files with an html extension instead of a txt extension (for instance save the first one as BeginJavaScript1.html) in a convenient place, and then, when you are ready, open the html files with any of Microsoft Internet Explorer, Mozilla, or Netscape Navigator. As none of these demos involve images, you will not have worry about saving image files.