|
A scripting
language developed by Netscape to enable
Web
authors to design interactive sites.
Although it shares many of the features and
structures of the full Java language, it was
developed independently.
JavaScript can
interact with HTML source code, enabling Web
authors to spice up their sites with dynamic
content. JavaScript is endorsed by a number
of software companies and is an open
language that anyone can use without
purchasing a license.
It is supported by
recent browsers from Netscape and Microsoft,
though Internet Explorer supports only a
subset, which Microsoft calls Jscript.
JavaScript is
the Netscape-developed object scripting
language used in millions of web pages and
server applications worldwide. Netscape's
JavaScript is a superset of the ECMA-262
Edition 3 (ECMAScript) standard scripting
language, with only mild differences from
the published standard.
Contrary to popular misconception,
JavaScript is not "Interpretive Java". In a
nutshell, JavaScript is a dynamic scripting
language supporting prototype based object
construction. The basic syntax is
intentionally similar to both Java and C++
to reduce the number of new concepts
required to learn the language. Language
constructs, such as if statements, for and
while loops, and switch and try ... catch
blocks function the same as in these
languages (or nearly so.)
JavaScript can function as both a procedural
and an object oriented language. Objects are
created programmatically in JavaScript, by
attaching methods and properties to
otherwise empty objects at run time, as
opposed to the syntactic class definitions
common in compiled languages like C++ and
Java. Once an object has been constructed it
can be used as a blueprint (or prototype)
for creating similar objects.
JavaScript's dynamic capabilities include
runtime object construction, variable
parameter lists, function variables, dynamic
script creation (via eval), object
introspection (via for ... in), and source
code recovery (JavaScript programs can
decompile function bodies back into their
source text)
Intrinsic objects are Number, String,
Boolean, Date, RegExp, and Math.
For a more in depth discussion of JavaScript
programming follow the Language and
Scripting Resources links in the table
below.
|