0% found this document useful (0 votes)
285 views4 pages

Web Scripting - Java Script: Chapter - 3

JavaScript is a scripting language used to make web pages more interactive. It was originally implemented in browsers to allow client-side scripts to interact with users and manipulate page content. JavaScript is now commonly used for both game development and desktop applications. The core language includes objects like Array and Math, while client-side JavaScript extends it with browser and DOM objects. Server-side JavaScript provides objects for server functionality. JavaScript enables dynamic multimedia content, user interaction and validation, and functional programming. It has broad browser support and can be used both client-side and server-side.

Uploaded by

Revati Menghani
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
285 views4 pages

Web Scripting - Java Script: Chapter - 3

JavaScript is a scripting language used to make web pages more interactive. It was originally implemented in browsers to allow client-side scripts to interact with users and manipulate page content. JavaScript is now commonly used for both game development and desktop applications. The core language includes objects like Array and Math, while client-side JavaScript extends it with browser and DOM objects. Server-side JavaScript provides objects for server functionality. JavaScript enables dynamic multimedia content, user interaction and validation, and functional programming. It has broad browser support and can be used both client-side and server-side.

Uploaded by

Revati Menghani
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 4

Chapter - 3: Web Scripting - Java Script

Introduction
JavaScript is an interpreted computer programming language. It was originally implemented as
Part of web browsers so that client-side scripts could interact with the user, control the browser,
Communicate asynchronously, and alter the document contents.
Nowadays, JavaScript has become very useful in both game development and the creation of desktop
applications.

JavaScript was developed in 1995 by Brendan Eich, at Netscape, and first released with
Netscape 2 early in 1996. It was initially called as Live Script, but was renamed as JavaScript in
order to capitalize the popularity of Sun Microsystem's Java language. JavaScript's use in applications
outside of web pages also like in PDF documents, site-specific browsers, and
desktop widgets and other useful applications.

JavaScript was formalized in the ECMAScript language standard and is primarily used as part of
a web browser (client-side JavaScript). This enables programmatic access to computational
objects within a host environment. JavaScript very quickly gained widespread success as a
client-side scripting language for web pages. Microsoft introduced JavaScript support in its own
web browser, Internet Explorer, in version 3.0, released in August 1996.

Core JavaScript contains a core set of objects such as Array, Date, Math, and a core set
of language elements such as operators, control structures, and statements. Core
JavaScript can be extended for a variety of purposes by supplementing it with additional
objects.

Client-side JavaScript extends the core language by supplying objects to control a


browser (Navigator or another web browser) and its Document Object Model (DOM).
For example, client-side extensions allow an application to place elements on an
HTML form and espond to user events such as mouse clicks, form input, and page
navigation.

Server-side JavaScript extends the core language by supplying objects relevant to


running JavaScript on a server. For example, server-side extensions allow an
application to communicate with a relational database, provide continuity of
information from one invocation to another of the application, or perform file
manipulations on a server.
Applications(USES)

Developing Multimedia Applications


The users can use JavaScript to add multimedia elements. With JavaScript you can show,
hide, change, resize images and create images rollovers. You can create scrolling text
across the status bar, thus making multimedia applications more interactive.

Create Pages Dynamically


Based on the user’s choice, the date or other external data, JavaScript can produce pages
that are customized to the user
.
Interact with the User
JavaScript can do some processing of forms and can validate user input when the user
submits the form.

JavaScript Objects are Similar to Dictionaries


In JavaScript, objects are just collections of name-value pairs. JavaScript objects are
considered as a dictionary with string keys. The users can get and set the properties of an
object using either the familiar "." (dot) operator, or the "[ ]" operator, which is typically
used when dealing with a dictionary

Features of JavaScript

Browser Support
All browsers have accepted JavaScript as a scripting language and provide integrated
support for it. For example, to access flash content, you need to install flash plug-in in your
browser. But to use JavaScript, you don't have to use any plug-in at all.

JavaScript can be used on Client Side as well as on Server Side


JavaScript has access to Document Object Model DOM of browser. You can change the
structure of web pages at runtime. Thus, JavaScript can be used to add different effects to
WebPages. On the other hand, JavaScript could be used on the server side as well.

Functional Programming Language


In JavaScript, function could be assigned to variables just like any other data types. A
function can accept another function as a parameter and can also return a function. You
can have functions with no name as well. This provides you the ability to code in functional
programming style.

Support for Objects


JavaScript is an object oriented language. However, the way JavaScript handles objects
and inheritance is bit different from conventional object oriented programming languages
like C++/ Java. JavaScript supports most of the object oriented concepts while being
simple to learn and use.

Run-time Environment
JavaScript typically relies on a run-time environment (e.g. in a web browser) to provide
objects and methods by which scripts can interact with "the outside world". In fact, it relies
on the environment to provide the ability to include/import scripts (e.g. HTML <script>
elements). This is not a language feature as such but it is common in most JavaScript
implementations.

Vendor-specific Extensions
JavaScript is officially managed by Mozilla Foundation, and new language features are
added periodically. However, only some JavaScript engines support these new features.

Object based Features Supported by JavaScript


JavaScript supports various features related to object based language and JavaScript is
sometimes referred to as an object-based programming language. Some robust features
which JavaScript supports related to object based are as follows:

Object Type
JavaScript supports the development of object types and in this context JavaScript
supports both predefined and user-defined objects. It is possible to assign objects of any
type to any variable. It is possible to instantiate the defined object types to create object
instances in JavaScript, which is a very powerful feature of Object based language.

Object Instantiation
In order to carry out the process of creating specific object instances available in
JavaScript, you can make use of a new operator. These two powerful, object-based
features supported by JavaScript described above make this an object model language. In

JavaScript, the object types are defined by properties and methods. Properties of Objects
are used to access the data values contained in an object. You can make use of the
properties of JavaScript objects for editing as well as reading depending on the object’s
nature. That is, if you want to carry out functions on the object, this is achieved by using
methods that make use of the object’s properties.

Why JavaScript?

JavaScript is a simple scripting language invented specifically for use in web browsers to
make websites more dynamic. On its own, HTML is capable of outputting more-or-less
static pages. Once you load them up your view doesn't change much until you click a link
to go to a new page.
Adding JavaScript to your code allows you to change how the document looks completely, from changing
text, to changing colours, to changing the options available in a drop-down list and much more.

JavaScript is a client-side language, which means all the action occurs on the client's
(reader's) side of things. This means that no trips to the server are required for JavaScript
to kick into operation, which would slow down the process enormously.

JavaScript operations are usually performed instantaneously. In fact, JavaScript is often used to
perform operations that would otherwise encumber the server, like form input validation.
This distribution of work to the relatively quick client-side service speeds up the process
significantly.
This access to information gives JavaScriptgreat power to modify the browsing experience. They can also
react to events, such aswhen the user clicks their mouse, or points to a certain page element. This is also a
verypowerful ability.

Browser Compatibility
JavaScript is supported by Netscape 2+, Internet Explorer 3+, Opera 3+ and most of the
other modern web browsers. Each new version of the main browsers has supported new
generations of JavaScript commands, each more complex than the earlier one. However,
script compatibility can still be a problem, as the language is not as standardised as
HTML.

You might also like