Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 86 - 2609_Logicode
P. 86

    21 st   #Technology Literacy
                         LAB ACTIVITY                                                           Century   #Creativity
                                                                                                  Skills

                         Visit your computer lab and perform the following actions:
                         ▶   Create an HTML file with a button. When clicked, an external JavaScript file should display an alert:
                            “Button clicked!”.

                         ▶   Write an HTML form that accepts an item’s price and discount percentage. On submit, calculate
                            and display the discounted price using JavaScript.

                         ▶   Write a JavaScript function to store and display the user’s name, age and agreement status in the
                            console.

                         ▶   Write a JavaScript function to calculate area that takes length and width as arguments and returns
                            the area of the rectangle. Call it with sample values.

                                                                                                     21 st   #Collaboration
                       GROUP DISCUSSION                                                           Century   #Communication
                                                                                                    Skills

                         Divide the class into two groups. Group 1 will focus on internal JavaScript and Group 2 on
                         external  JavaScript.  Each  group  will present  their  findings,  comparing  the  advantages  and
                         disadvantages and provide real-life examples of when each is preferred.

                         FOR THE TEACHER

                        1.  Discuss some more statements of JavaScript with the students.
                        2.  Explain the features of JavaScript in detail to the students.

                       84   Premium Edition-VIII

| 81 82 83 84 85 86 87 88 89 90 91 |