Home : WDD : JavaScript
|
The Bare Facts: JavaScript
From Subhash...
JavaScript is here to stay...The DOM specification by W3C is an indication that this language will be carried to the <XML> age. So isn't it time that you learnt it?
- JavaScript is not Java. Java is a compiled language while JavaScript is an intrepreted one.
- JavaScript has syntax similar to C & Perl.
- JavaScript is case-sensitive.
- JavaScript is used with HTML to get over the limitations of HTML. In an HTML document the script is placed within the <script> tags.JavaScript may also be kept in a separate file with an extension *.js and attached to an page using <script language="JavaScript" src="path/where/the/file/is/filename.js"></script>
- JavaScript can be divided into 'Server-side JavaScript' and 'Client-side JavaScript'. As the name suggests, in 'Server-side JavaScript' the server interprets the script & sends the output to the user. In 'Client-side JavaScript' interpretation is done by the web browser. In this page 'JavaScript' refers only to 'Client-side JavaScript'.
- Both 'Server-side JavaScript' & 'Client-side JavaScript' are executed in different environments - that of the server & client's browser respectively. Therefore their Document Object Model (DOM) differs substantially. DOM specifies the 'objects' in the environment where the script operates. Thus in 'Client-side JavaScript' HTML is the environment where the script operates. Some of the common objects of HTML are - images, links, form elements. Thus using DOM you can modify these objects dynamically during run-time.
|