instructional systems
Index:
[Session11] JavaScript 1 (Interactive page)
1 Chapter1
2 Chapter2
3 Chapter3
--3.3 Application of Handling
4 Chapter4
5 Chapter5
Your Location: Home Page  >  [3] Interactive web pages using JavaScript (on condition)  >  [Session11] JavaScript 1 (Interactive page)  >  Chapter2  >  2.1 Let’s Create a Dynamic Web Page
Let’s Create a Dynamic Web Page
[The purpose of this section]
What’s it like to create a dynamic Web page? Learn what is used to create one.

Creating a Dynamic Web Page -- Use of JavaScript

So far we have learned the techniques of information transmission using the WWW framework, but with HTML and CSS you cannot create a page like that below.

  • Automatically updating the information.

    The time display will be different next time you visit this page!

  • The page view will be varied by the operations of the visitor.

    Move your mouse pointer toward the picture of a fish and play with it (do not click).

    Copyright (C) Eri Hayashi 2003-2005, All Rights Reserved

  • ? Responding to the visitor’s talk (by character input).

    Let’s see your fortune today.

    Copyright (C) Toshihiro Kita 2003-2005, All Rights Reserved

To create a dynamic Web page just like those in the above examples, the simplest method would be to use a programming language called JavaScript language.

“Programming language” is a dedicated language to give directions to a computer. Every application is written in some programming language, but there are so many kinds.

Among them, the JavaScript language was created to support the auxiliary functions for HTML that is a document structure describing language, and is the dedicated programming language for creating Web pages. Therefore you don’t see any reason why we should not use it.

Two Ways to Use JavaScript Language

There are two major ways to use JavaScript in a Web page, as follows.

[1. To read a JavaScript file]
A program file of JavaScript, which is created separately from an HTML file, is to be read into the corresponding position of an HTML first, and then is to be used.
[2. To write a JavaScript file directly]
The JavaScript program is directly written into the relevant position of an HTML file.

Although in this course you will learn both of these methods, we will start from [1. To read a JavaScript file] first, in Session 11. From the next page on, we will go through the procedure step by step.
(We will come back to [2. To write JavaScript file directly] in Session 12.)

Copyright (C) Kenichi Sugitani, Hideki Matsuda, Chisato Noguchi and Fumiko Ryu 2005-2006, All Rights Reserved