developed by Netscape for dynamic content.
It is a programming language that makes a
It is lightweight and can be used as an
Object Oriented Language
It was first created by Brendan Eich at
Netscape in 1995
It was named Mocha during development
and released in beta as LiveScript
the popularity of Java for marketing reasons
Interpreted (not compiled) by client. Compiled byte codes downloaded from server,
executed on client.
Object-oriented. No distinction between types
of objects. Inheritance is through the prototype
mechanism, and properties and methods can be
added to any object dynamically.
Class-based. Objects are divided into classes
and instances with all inheritance through the
class hierarchy. Classes and instances cannot
have properties or methods added dynamically.
Code integrated with, and embedded in,
Applets distinct from HTML (accessed from
Variable data types not declared (dynamic
Variable data types must be declared (static
Cannot automatically write to hard disk. Cannot automatically write to hard disk
loading or when the browser fires an event
All statements are executed at page loading
Some statements define functions that can
be called later
It runs in a browser so you don’t need to
download any software to use it
A web page can be used without a
Implementing form validation
Content loading and changing dynamically
Implementing AJAX functionality
Can read and write HTML element and
modify the DOM structure
Can handle exceptions
<script> tag in the head
<script> tag in the body
There are two types of files used with the
1) Including it’s code in any other file for
example an HTML file or in any other script
or non script-based file
2) The file in this case would have the
extension appropriate to the type of file for
example .htm or .html for an HTML file.
3) Another way is to create a file that uniquely
The way that document content is accessed
and modified is called the Document Object
Model, or DOM. The Objects are organized
in a hierarchy. This hierarchical structure
applies to the organization of objects in a
Window object: Top of the hierarchy. It is
the outmost element of the object hierarchy.
Document object: Each HTML document
that gets loaded into a window becomes a
document object. The document contains the
content of the page.
Form object: Everything enclosed in the
<form>...</form> tags sets the form object.
Form control elements: The form object
contains all the elements defined for that
object such as text fields, buttons, radio
buttons, and checkboxes.
Rhino is an open-source implementation of
It is typically embedded into java applications
to provide scripting to end users.
widely used and will become more popular in
the future with the advancement of
It is also used an Object Oriented Language
-> W3Schools.com-some tutorials on the
-> SlideShare.net- implementing ideas