Page 191 - DCAP408_WEB_PROGRAMMING
P. 191

Unit 6: DOM Model




          6.5 Keywords                                                                          Notes

          DOM: Document Object Model used by JavaScript enabled browses to identify the collection of
          web page objects.

          JavaScript Event Handlers: JavaScript use event handlers to facilitate the passing of knowledge
          that an event has occurred from the HTML code to the JavaScript.
          JSSS: JavaScript Assisted Style Sheets, which uses JavaScript syntax to  control a document’s
          presentation  style.
          Object Hierarchy: HTML objects belonging to DOM have a descending relationship with each
          other starting from the browser itself, window, document, form and so on.
          Objects: Elements that have properties that determine the functionality of the object, methods
          that allow access to these properties and events to appropriate event handlers.
          6.6 Review Questions


          1.   List some of the ways a web page event could be associated with the action of the mouse
               cursor on a web page.

          2.   Create a web page using two image files, which switch between one another as the mouse
               pointer moves over the images. Use the onMouseOver and onMouseOut event handlers.
          3.   JavaScript has the ability to control the behavior of these objects through their properties
               and methods. Explain
          4.   What implications does the DOM have for other standards?
          5.   What is the relationship between stylesheets and the DOM?

          6.   Will accessibility considerations be an active part of the DOM development?
          7.   If the DOM is language-neutral, what language do you specify the interface in?
          8.   What does it mean to be compliant with the DOM specification?
          9.   Will broken HTML pages work in the DOM? Explain with examples.
          10.  The  onLoad and onUnload events are triggered when the user enters or leaves the page.
               Explain with a suitable program.

          Answers: Self  Assessment

          1.   web page                          2.  FORM
          3.   browser                           4.  JavaScript

          5.   document’s                        6.  objects
          7.   accessible                        8.  JavaScript
          9.   checkForm()                       10.  onSubmit
          11.  onMouseOut                        12.  server

          13.  alert box                         14.  Server-side
          15.  Form validation






                                           LOVELY PROFESSIONAL UNIVERSITY                                   185
   186   187   188   189   190   191   192   193   194   195   196