PGDEL/DECP03/Unit3/16

 Unit 3.3 Web application development tools &amp; Technologies  JavaScript

HTML is static and allows a very minimum interaction with users by providing hyperlinks. Processing user request is generally done via scripts, Scripts are small program that are based on the server.

 JavaScript is a scripting language created by Netscape. JavaScript is an object based language that allows creation of interactive web pages. This provides a power to the web site to return information according to a user’s requests. The web site development environment should also provide facility for validating user input.

The advantages of JavaScript:

1. JavaScript is an interpreted language; syntax is interpreted by the browser. 2. It can be written in any text editor i.e. notepad. 3. HTML file can be embedded with the JavaScript. 4. Scripts can be developed in short period of time. 5. JavaScript supports object oriented programming. We can program various events i.e. Button event, Mouse event etc. 6. JavaScript is an interpreted language; appropriate error massage along with the line number is displayed so this makes it easy for debugging. 7. JavaScript is a platform independent language i.e. independent of hardware and understood by any JavaScript enabled browsers.

JavaScript can be embedded into a HTML file within the &lt;SCRIPT&gt;… … …. &lt;/SCRIPT&gt; tag.

Syntax:

&lt;SCRIPT LANGUAGE=”JavaScript”&gt;          // JavaScript code will be written here      &lt;/SCRIPT&gt;

The programming capabilities of the JavaScript are same as other programming languages i.e. data types, variables, constants, programming constructs, user defined functions etc.