PGDEL/DECP03/Unit3/16

From WikiEducator
< PGDEL‎ | DECP03‎ | Unit3
Jump to: navigation, search



Unit 3.3 Web application development tools & 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 <SCRIPT>… … …. </SCRIPT> tag.

Syntax:

      <SCRIPT LANGUAGE=”JavaScript”>
           // JavaScript code will be written here
      </SCRIPT>

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

Road Works.svg Work in progress, expect frequent changes. Help and feedback is welcome. See discussion page. Road Works.svg