Sail E0 Webinar

MCQs

Total Questions : 80 | Page 7 of 8 pages
Question 61. What is the property to access the first child of a node?
  1.    timestamp.Child1
  2.    timestamp.Child(1)
  3.    timestamp.Child(0)
  4.    timestamp.firstChild
 Discuss Question
Answer: Option D. -> timestamp.firstChild
Question 62. What are the properties supporting CSS styles for a document element?
  1.    style and font
  2.    style and className
  3.    size and style
  4.    className and font
 Discuss Question
Answer: Option B. -> style and className
Question 63. The style property belongs to while of the following object?
  1.    Element
  2.    Window
  3.    Location
  4.    None of the mentioned
 Discuss Question
Answer: Option A. -> Element
Question 64. Which handler is triggered when the content of the document in the window is stable and ready for manipulation?
  1.    onload
  2.    manipulate
  3.    create
  4.    none of the mentioned
 Discuss Question
Answer: Option A. -> onload
Question 65. What is the purpose of the event handlers in the JavaScript?
  1.    Adds innerHTML page to the code
  2.    Performs handling of exceptions and occurences
  3.    Allows JavaScript code to alter the behaviour of windows
  4.    None of the mentioned
 Discuss Question
Answer: Option C. -> Allows JavaScript code to alter the behaviour of windows
Question 66. When a program contains extensive use of event handlers, which of the following is necessary?
  1.    Modular functions
  2.    Nested functions
  3.    Split up programs
  4.    All of the mentioned
 Discuss Question
Answer: Option B. -> Nested functions
Question 67. What is the code snippet to find all container elements with class “reveal”?
  1.    var elements = document.getElementsByClassName("reveal");
  2.    var elements = document.getElementByClassName("reveal");
  3.    var elements = document.getElementByName("reveal");
  4.    var elements = document.getElementsClassName("reveal");
 Discuss Question
Answer: Option A. -> var elements = document.getElementsByClassName("reveal");
Question 68. What is the code snippet to update the content of the timestamp element when the user clicks on it?
  1.    timestamp.onLoad = function() { this.innerHTML = new Date().toString(); }
  2.    timestamp.onclick = function() { this.innerHTML = new Date().toString(); }
  3.    timestamp.onload = function() { this.innerHTML = new Date().toString(); }
  4.    timestamp.onclick = function() { innerHTML = new Date().toString(); }
 Discuss Question
Answer: Option B. -> timestamp.onclick = function() { this.innerHTML = new Date().toString(); }
Question 69. What is the code snippet to change the class and let the stylesheet specify the details?
  1.    timestamp.className = "highlight";
  2.    timestamp.className = "change";
  3.    timestamp.className = "specify";
  4.    timestamp.className = "move";
 Discuss Question
Answer: Option A. -> timestamp.className = "highlight";
Question 70. Which of the following is not an object?
  1.    Element
  2.    Location
  3.    Position
  4.    Window
 Discuss Question
Answer: Option C. -> Position

Latest Videos

Latest Test Papers