JavaScript is Netscapes cross platform object based scripting language for client and server applications.
A JavaScript consists of JavaScript statements that are placed within the <script>... </script> HTML tags in a web page. You can place the <script> tag containing your JavaScript anywhere within your web page and keep it within the <head> tags. The <script> tag alert the browser program to begin interpreting all the text between these tags as a script.
JavaScript statement will look like
<script language="Javascript"> JavaScript statements..... <script>
This is the most common way of using JavaScript on HTML pages.
<html>
<head>
<title>My first Javascript code</title>
<Script SRC="myCode.js">
</Script>
</head>
<body>
</body>
</html>
The expression is preceded by an & and followed by ; and enclosed in curly braces {}
<H2/>&{myTitle};</H2>
Here myTitle is a JavaScript variable.
<html>
<head>
<title>My first Javascript code</title>
</head>
<INPUT TYPE = "button" VALUE="click"
onClick="Javascript:javascriptFunction();">
<body>
</body>
</html>
Javascript allows more than one statement which can be included by separating with a semicolon ";"