Module_3-NOTES
Module_3-NOTES
CHAPTER 6
JavaScript: Client-Side Scripting
Chapter Objectives
In this chapter you will learn . . .
■ About the role of client-side scripting in web development
■ How to create fail-safe design that will work even if JavaScript is
not enabled
■ The important syntactic elements of JavaScript
■ About built-in JavaScript objects
■ How to prevalidate forms using JavaScript
Subtopics
JavaScript and Java are vastly different programming languages with different uses.
Sl Java Javascript
No
1 Full-fledged object oriented Fewer of the object-oriented
language features of Java
2 Runs on any platform with a Java Runs directly inside the browser,
Virtual Machine installed without the need for the JVM.
3 In Java, variables are statically In JavaScript, the variables are
typed dynamically typed
4 The data type of a variable is The variables can be easily (or
defined by the programmer (e.g., implicitly) converted from one data
int abc) and enforced by the type to another.
compiler.
5 With JavaScript, the type of data a
variable can hold is assigned at
runtime and can change during run
time as well.