What is JavaScript ?

What is JavaScript?


  • JavaScript was designed to add interactivity to HTML pages
  • JavaScript is a scripting language/ a scripting language is a lightweight programming language
  • A javascript consists of lines of executable computer side
  • A javascript is usually embedded  directly into HTML pages
  • Javascript is an interpreted language /means that script execute without preliminary compilation
  • Everyone can use Javascript without purchasing a license.
  • It is free to use for everyone.
How to put Javascript INTO an HTML Page
  • To insert a JavaScript into the HTML page, we use the <script>tag
Here I show you JavaScript SYNTAX : 

            <SCRIPT LANGUAGE="JavaScript">
                                            
                                    //Javascript code goes here
            </SCRIPT>

the tag "<Script>" is an open tag for Javascript and  "</Script>" is closing tag for Javascript.

Attribute:

Language: Indicates the scripting language used for writing the scripting code.

  • The word document.write is a standard javascript command for writing output to a page
  • By entering the document. write command between the <script type="Javascript"> and </script> tags, the browser will recognize it as a javascript command and execute the code line.

For example:

<HTML>
<Body>
                <script type="javascript">
                            document.write("Hello World")
                </script>
</Body>
</Html>

The code above will produce this output on an HTML page :

    






Comments

Popular posts from this blog

SQL plus and Get Started With Oracle Database 11g Express Edition