HTML and CSS Reference
In-Depth Information
JavaScript handled by a browser is called client-side JavaScript. Although JavaScript
is used mainly as a client-side scripting language, it can also be used in contexts other
than a Web browser. Netscape created server-side JavaScript to be programmed as a CGI
language, such as Python or Perl, but this topic will address JavaScript as it is most com-
monly used—running on the client side, your browser.
Figure 1.1 A dynamic Web page using JavaScript to give it life. For example, if the
user rolls the mouse over any of the text after the arrows, the text will become
underscored links for navigation.
1.2 What JavaScript Is Not
JavaScript is not Java. “Java is to JavaScript what Car is to Carpet” 2 Well, that quote
might be a little extreme, but suggests that these are two very different languages.
Java was developed at Sun Microsystems. JavaScript was developed at Netscape. Java
applications can be independent of a Web page, whereas JavaScript programs are embed-
ded in a Web page and must be run in a browser window. 3 Java is a strongly typed lan-
guage with strict guidelines, whereas JavaScript is loosely typed and flexible. Java data
2. From a discussion group on Usenet, also p. 4 Beginning JavaScript with DOM Scripting and Ajax by Christian
Heilmann, APRESS, 2006.
Search WWH ::

Custom Search