Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 122 - 2625 PortGPt V2.1
P. 122

    2.  <html>

                               <head> <title>          EVENT HANDLING </title>

                               <script>

                               function changeColor(color) {

                                document.body.style.background = color;

                               }

                               </script></head>

                               <body bgcolor="blue">

                               <p> WELCOME </p>

                               <input type="button" onclick="changeColor('red')" value="Red">

                                 <input type="button" onclick="changeColor('yellow')"
                               value="Yellow">

                                 <input type="button" onclick="changeColor('green')"
                               value="Green">

                               </body> </html>

                                                             For The Teacher

                         •   Discuss all the topics covered in this chapter with the students.
                         •   Tell the students about various types of events that can occur.

                      120   Premium Edition-VIII

| 117 118 119 120 121 122 123 124 125 126 127 |