Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 119 - 2625 PortGPt V2.1
P. 119

    test Your skiLLs

                     1.  Tick ( ) the correct option.
                         a.   The act of responding to events is known as ______________.

                              (i)   handleClick                             (ii)   event handling

                              (iii)   handling                              (iv)   event manager
                         b.  An event handler is a ______________ that executes when the event occurs.

                              (i)   section of code                         (ii)  loop
                              (iii)   output                                (iv)   All of these

                         c.   We can attach a click event listener to the ______________ element.
                              (i)  paragraph                                (ii)  textbox

                              (iii )   button                               (iv)   mouse
                         d.  Which of the following is NOT an event?

                              (i)   Click                                   (ii) mousemove
                              (iii )   submit                               (iv) mousehover

                         e.   A function specified in a script can be called by an event handler defined in ______________.
                              (i)  HTML                                     (ii) JavaScript Code

                              (iii )   document                             (iv) All of these

                     2.  Fill in the blanks using the words from the help box.

                                                event handler, alert box, state, click, respond

                         a.   An event is defined as a change in an object's ______________.

                         b.  You can attach an event handler to an event to ______________ to it.
                         c.   The simplest and most widely used is the ______________ event which occurs on the click
                             of a button.

                         d.  We refer to defining such a section of code to execute in response to an event as "registering
                             an ______________."

                         e.  An ______________ is used to display messages.
                     3.  Write 'T' for true and 'F' for false statements.

                         a.   In submit event, the user clicks on a button.                                           ___

                         b.   We attach an event listener to the HTML element.                                        ___
                         c.    The actions of pressing any key/button, closing a window, resizing a
                              window, etc. are examples of events.                                                    ___

                                                                                          Introduction to Event Handling  117

| 114 115 116 117 118 119 120 121 122 123 124 |