Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 74 - 2612_Digimind
P. 74

    b.   Riya  is creating  a web  page  and  wants to  write  JavaScript  code  directly  inside  her HTML file
                             so  that it  runs when the  page  loads.  Which  HTML tag  should  she  use  to  include  this  internal
                             JavaScript code?

                              (i)   <STYLE>                                    (ii)  <LINK>
                             (iii)   <SCRIPT>                                  (iv)  <META>
                          c.   Arjun saves his JavaScript code in a separate file so that it can be reused across multiple web
                             pages. Which file extension should he use while saving the JavaScript file?
                              (i)  .html                                       (ii)  .js

                             (iii)   .css                                      (iv)  .json
                          d.   While testing a web page, a developer wants to show a simple pop-up message to the user with
                             some  information  and  only  an OK button.  Which  JavaScript  method  should  be  used  for this
                             purpose?
                              (i)  prompt()                                    (ii)  alert()
                             (iii)  confirm()                                  (iv)  document.write()

                          e.   During program execution, a JavaScript statement is evaluated and produces a result that can be
                             stored or used for further calculations. What is this unit of code called?

                              (i)  Comment                                     (ii)  Expression
                             (iii)  Operator                                   (iv)  Variable

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

                                                Mocha, //, client, text/javascript, prompt()

                          a.  JavaScript was originally named _______________.

                          b.  JavaScript uses the _______________ method to receive user input.
                          c.   To specify  that  a script  is written  in JavaScript,  we use the TYPE  attribute  with the value
                             _______________.
                          d.  In JavaScript, a single-line comment is added using _______________.

                          e.  JavaScript is a _______________ side scripting language.

                      3.  Write 'T' for true and 'F' for false.
                          a.  JavaScript is a server-side scripting language.

                          b.  JavaScript is platform-independent.

                          c.  The first web browser to support JavaScript was Netscape.

                          d.  JavaScript can run without being embedded in HTML code.

                          e.  JavaScript is a case-sensitive language.

                      4.  Answer in one or two words.
                          a.   Which are used to add notes in your code or to disable sections of code without
                             deleting them?                                                               _______________

                       72   Premium Edition-VIII

| 69 70 71 72 73 74 75 76 77 78 79 |