Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 85 - 2609_Logicode
P. 85

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

                                        Web Browser, Variable, Confirm, Comments, JavaScript

                        a.   In              , code is written within the HTML web page.

                        b.                  are the instruction that are not executed by interpreter.
                        c.  A                 is a memory reference to a stored value.

                        d.  A                 Box asks the user to confirm or cancel an action.

                        e.   A                is an application program that has a graphical user interface for displaying
                            HTML files.
                     4.  Think and answer.

                        1.  Define functions in JavaScript.

                        2.  Write the function of popup boxes in JavaScript.

                        3.  Explain the term expression.

                        4.  What are comments?

                        5.  Write the steps for setting up JavaScript in a web browser.

                                                                                                  21 st   #Critical Thinking
                     5.  Competency-based/Application-based questions.                         Century
                                                                                                 Skills  #Technology Literacy

                        a.   Riya is creating a form where the user must provide a valid email (emailInput) and agree to the terms
                            (termsCheckbox). Which operator ensures both conditions are true before submitting the form?
                        b.   Sameer is developing a website where a pop-up asks for the user’s name and greets them with a

                            personalised message. Which JavaScript popup would Sameer use?
                        c.   A web developer is creating a webpage and wants to add JavaScript code directly within the HTML
                            document to control the behaviour of an interactive button. Where should the developer place the
                            JavaScript code, and what tags should be used?
                        d.   You are designing a simple web form to collect user feedback. The form asks users to input their
                            age using a prompt box. If the user clicks 'OK', the entered age is returned. If the user clicks 'Cancel',
                            no data is returned. What happens if the user clicks 'Cancel'?
                        e.   A website wants to notify users about unsaved changes before they navigate away from a page.
                            Which popup box will trigger the alert?

                                                                                               JavaScript for Beginners  83

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