JavaScript
Java script is an interpreted language that is used to add dynamic contents in web pages. Interpreted means that the entire webpage is downloaded to the browser and the interpreted one line at a time.Java Script is used to include messages, scrolling text, animations, menus, pop-up windows etc.JavaScript is directly embedded in HTML .
Java Script was developed by Sun Microsystems and Netscape Communicato.It is an open language.It can be used without purchasing.Netscape supports JavaScript It can be used without purchasing.
Advantages of JavaScript
Intepreted LanguageJavascript is an interpreted language.It requires no compilation process so no compiler is required .The browser interprets JavaScript as it interprets HTML tags.
Easy to Learn
The syntax of JavaScript is very easy.Any person can learn it very easily and use it to develop dynamic and interactive websites.
Easy to Debug and Test
JavaScript code is interpreted line by line.The errors are indicated along with line number.It is very easy to find error in the code, correct
it and test it again.
Event Based Programming
JavaScript is an event based language.It means that different code segments are executed when certain event occurs.For ecample, a code segment may execute when the user
clicks a button or moves mouse over an object etc.
Procedural Language
JavaScript provides all capabilities of a procedural language.It provides condition checking ,loops and branching facilities that can be executed in a web page.
Uses of JavaScript
Input ValidationJavaScript can be used to validate the input.Data entered in forms should be validated before it is processed.For example,if a user enters an email,it must be valid email.
JavaScript code can ensure its validity by checking that it contains @ symbol and dot(.).
Mouse Rollover Effects JavaScript can be used to create different buttons with interesting mouse rollover effects.When the user moves the mouse over a button
different effects are generated.It makes browsing more interesting and attractive.
Popup Windows
JavaScript can be used to create popup windows.These windows are normally used to display important announcement ,offers and news .Popup windows can be created of different windows of different sizes .
Dynamic Contents
JavaScript can be used to generate dynamic contents in a website.For example, the current date and time can be displayed o web page.Different HTML tags can be generated based on the user input etc.
User Interaction
JavaScript can be used to interact with the user.The input entered by the user can be processed and proper message can be displayed to the user.The interactive capability of a website makes it more interesting and productive for the users.
0 Comments