This section provides you some basics of JavaScript language.
JavaScript is simple scripting language that can be used inside Web pages to generate dynamic page contents.
From a language syntax point of view, JavaScript is very similar to Java.
JavaSctipt supports the following basic features:
Variables
Arrays
Arithmetic expressions
String expressions
Logical expressions
Conditional statements
Loops
Buit-in functions
User-defined functions
Accessing browser window and document objects
JavaScript statements can be included in Web pages using the "script" element as shown in the following example:
<p>Your random number is:
<script type="text/javascript">
number = Math.round((Math.random()*9)+1);
document.write(number);
</script>
</p>