Page 120 - PortGPT_V2.1_C8_Flipbook
P. 120

4.  Short answer type questions.

                      a.   Name 2 events.
                           ____________________________________________________________________________

                      b.   Name 2 event handlers.

                           ____________________________________________________________________________

                      c.   What is an event?

                           ____________________________________________________________________________
                      d.   What is a function?

                           ____________________________________________________________________________

                  5.  Long answer type questions.

                      a.   What is event handling?
                      b.   How does Event handling take place in JavaScript?



                  fun Zone




                    Let's soLve

                      What will the output of the following code be?

                      <html>

                      <head> Events </head>

                      <body>
                      <script language="Javascript" type="text/Javascript">

                           <!--
                           function clickevent()

                           {
                                     var i, num, f, a;

                                     f = 1;

                                     num = 5
                                     a= num;

                                     for(i = 1; i <= num; i++)

                                     {
                                                    f = f * i;

                                     }


                  118   Premium Edition-VIII
   115   116   117   118   119   120   121   122   123   124   125