Page 72 - DCAP202_Fundamentals of Web Programming
P. 72

Unit 6: Introduction to JavaScript




          Self Assessment                                                                       Notes

          Fill in the blanks:
          1.   Developed under the name ..........................., LiveScript was the official name for the language
               when it first shipped in beta releases of Netscape Navigator 2.0.

          2.   The change of name from ........................... to JavaScript roughly coincided with Netscape
               adding support for Java technology in its Netscape Navigator web browser.

          6.2 JavaScript and Web


          JavaScript is a scripting language designed primarily for adding interactivity to Web pages and
          creating Web applications.
          JavaScript  is  the  scripting  language  implemented  on  web which  is  used  to  add  several
          functionalities, validating the form, as well as communicating with servers etc.


                 Example:
          <!DOCTYPE  html>
          <html>
          <head>
          <script>
          function  displayDate()
          {
          document.getElementById(“demo”).innerHTML=Date();
          }
          </script>
          </head>
          <body>

          <h1>WELCOME  TO  JAVA  SCRIPT</h1>
          <p  id=”demo”>to  get  current  date  click  on  display  date.</p>

          <button  type=”button”  onclick=”displayDate()”>Display  Date</button>

          </body>
          </html>
          Self Assessment


          Fill in the blanks:
          3.   ........................... is a scripting language designed primarily for adding interactivity to Web
               pages and creating Web applications.
          4.   JavaScript is the scripting language implemented on ...........................

          6.3 JavaScript

          JavaScript is  a programming language used to make web pages interactive. It runs on your
          visitor’s computer and doesn’t require  constant downloads from your website. JavaScript  is
          often used to create polls and quizzes.



                                           LOVELY PROFESSIONAL UNIVERSITY                                   65
   67   68   69   70   71   72   73   74   75   76   77