Searching...
Sunday, 30 September 2012

What is JavaScript

10:39 pm

What is JavaScript

        What is JavaScript :

1.       JavaScript was design to add interctive to html pages
2.       JavaScript is a scripting language
3.       A scripting language is a light wight programming languange
4.       Javascript is usually embedded directely into html pages
5.       Javascript is an interpreted languange(means that scripts execuate with out preliminary compitation )
6.       Javascript work in all major browers such as IE ,FireFox,Chrome ect.,
7.       Javascript gives html designers a programming tool
8.       Javascript can put dynimic text into an html page
9.       Javascript can react to events
10.   Javascript can read and write html elements
11.   Javascript can be used to validate data in client side
12.   The html <script> is used to insert a java script into an  html page.

J Scrip1.html
<html>
<body>
<script type=”text/javascript”>
document.write(“<H1>java script example 1</h1>”);
</script>
</body>
</html>


1. An external javascript  file shoud be saved with extension of “.js”.
2. To include and external javascript file into your document .

<script type=”text/javascript” src=”myscript.js”>
</script>

3. Java script is casesensitive .
4. Single line comments in java script:   //
5. Double line/multi line comments in java script:   /*                 */

Example program :

Myscript.js

Document.write(“<h1>external java Script exmple</h1>”);
Jscript1.html
<html>
<head>
<script type=”text/javascript” src=” myscript.js”>
</script>
</head>
<body>
<h1>Indian Technologies</h1>
</body>
</hmtl>





0 comments:

Post a Comment