JAVA SCRIPT INTRODUCTION Java script is a scripting language developed jointly by SUN and NETSCAPE and meant for the WWW. A scripting language is a simple scripr based programming language designed to enable programmers to write useful programs quickly. A script is similar to a macro which tells a program how to perform a specific procedure. JAVA SCRIPT FACTS •
Java Script is Embedded into HTML
JavaScript code is usually embedded in to a HTML document and is executed within them. By itself Java Script has no user interface. It relies on HTML to provide the means of interaction with the user. Most of Java Script extends the capabilities of HTML by providing events driven code to execute it. • JavaScript Is Browser Dependent Java Script depends on the web browser to support it. If the browser doesn’t support it. Java Script code will be ignored. Internet Explorer 3.0 and Netscape Navigater 2.0 Onwords support Java Script.
•
Java Script is an Interpreated Language
Java Script is interpreated at runtime by the browser before it is executed. It is not compiled into a separate program like a .exe but remains part of the HTML file. •
Java Script is a Loosely Typed Language
Java Script is very flexible compared to java. You need not specify the data type of a variable while declaring it. Also, you need not declare varisble explicitly. It is perfectly legal to declare variable as and when you require them. You can also change the variable data type runtime. •
Java Script Is an Object-Baced Language
Java Script is as object baced language. You can work with objects that encapsulate data and behavior. However JavaScript object model is instance-baced and there is no inheritance. This is the basic difference between an object oriented and an object baced language. •
JavaScript Is Event-Driven
HTML object such as buttons are enhanced to support event handler. You can specify the functionality of a button. •
JavaScript is not Java
Java applet is stored in a separate file and connected to a HTML file through the