Java Script attributes


  • JavaScript code starts with the tag <script language="JavaScript"> and ends with the tag </script>. The code placed between <head> and </head>.
  • For example:
    <html>

    <head>

    <title>This is a JavaScript example</title>

    <script language="JavaScript">

    <!--

    document.write("Hello World!");

    //-->

    </script>

    </head>

    <body> Hi, man! </body>

    </html>
  • Sometimes, people embed the code in the <body> tags:
  • For example:
    <html>

    <head></head>

    <body>

    <script>

    .....// The code embedded in the <body> tags.

    </script>

    </body>

    </html>

0 comments :

Post a Comment

> Related Posts with Thumbnails
 

Copyright © 2012. GS dot net - All Rights Reserved - Design by BTDesigner - Proudly powered by Blogger