JAVA SCRIPT(JS)

  • Java Script is a client side scripting language executed by any browser or server directly
  • Java Script will implement dynamic content on html page
  • Java Script is case sensitive language
  • Java Script will produce the errors but not display on the web page it will always store error on browser error console but if you get any error entire Java Script will stop execution
  • Java Script supports advanced concepts like dom, events and validation  
  • Java Script must implement in script tag
  • Script tag also supports PHP, .VB Script, Java Script, ext… but default language is always Java Script but
  • We can write script tag in head tag and also body tag
  • We can implement in three types

1. inline Java Script: It is just for executing the java script functions
<html>
         <head>
                                <title>inline Java Script</title>
</head>
    <body>
        <input type='button' value='print' onclick="javascript:window.print()"/>
    </body>
</html>

2. Internal Java Script: Implement Java Script header part this scripting will available entire web page
<html>
    <head>
    <script src='external.js' language='javascript' type='text/javascript'></script>
     <script language="javascript">
                  document.write("Internal Scripting");
     </script>
    </head>
    <body>
       <input type='button' value='print' onclick="javascript:window.print()"/>
    </body>

3. External Java Script: implement the Java Script in separate web page and must save files with .js extension  

document.write("External Scripting");

No comments:

Post a Comment