Docsity

DHTML and JavaScript Exercises: Questions and Answers, Exams of Topology

Toggle sidebar
bg1
LIS Final questions and answers latest top
score.
"DHTML" refers to a single technology. - correct answers.False
Which of the following is the correct syntax for accessing the value of the href attribute
for the third a element in a document?
-document.getElementByID=d("a").href
-document.getElementByTagName("a")[3].href
-document.getElementByTagName("a")[2].href
-document.getElementByTagName("href")[3] - correct
answers.document.getElementByTagName("a")[2].href
The ____ property of the Image object allows JavaScript to dynamically change an
image.
-src
-img
-path
-file - correct answers.src
pf3
pf4
pf5

Partial preview of the text

Download DHTML and JavaScript Exercises: Questions and Answers and more Exams Topology in PDF only on Docsity!

LIS Final questions and answers latest top

score.

"DHTML" refers to a single technology. - correct answers.False Which of the following is the correct syntax for accessing the value of the href attribute for the third a element in a document?

  • document.getElementByID=d("a").href
  • document.getElementByTagName("a")[3].href
  • document.getElementByTagName("a")[2].href
  • document.getElementByTagName("href")[3] - correct answers.document.getElementByTagName("a")[2].href The ____ property of the Image object allows JavaScript to dynamically change an image.
  • src
  • img
  • path
  • file - correct answers.src

The getElementsByName() method always returns an array, even if there is only one element in the document with a matching name attribute. - correct answers.True At the core of DHTML is ____.

  • DOM
  • JavaScript
  • XML
  • CSS - correct answers.DOM What is the correct JavaScript syntax to change the content of the HTML element below?

This is a demonstration.

- document.getElementByName("p").innerHTML = "Hello World!"; - document.getElementById("demo").innerHTML = "Hello World!"; - #demo.innerHTML = "Hello World!"; - document.getElement("p").innerHTML = "Hello World!"; - correct answers.document.getElementById("demo").innerHTML = "Hello World!"; The ____ method returns an array of elements that match a specified tag name. - getElementsById() - getElementsByTagName() - getElementsByTagId() - getElementsByName() - correct answers.getElementsByTagName() The following statement finds all of the elements in the HTML document: var x = document.getElementsByTagName("p"); - correct answers.False The innerHTML property is used to get or replace the content of an HTML element. - correct answers.True Through the ____ object you can access other objects that represent elements on a Web page. - Image - Input - Element - Document - correct answers.Document The DOM is a W3C (World Wide Web Consortium) standard. - correct answers.True The following example returns a list of all elements where the id="intro" var x = document.getElementsByClassName("intro"); - correct answers.False
  • All are true
  • HTML/DOM manipulation
  • CSS manipulation - correct answers.All are true Look at the following selector: $("p #intro"). What does it select?
  • The p element with id="intro"
  • All intro elements with id="p"
  • All p elements with class="intro"
  • All p elements with id="intro" - correct answers.The p element with id="intro" The following jQuery statement will select all of the elements on the HTML document.
  • $(.*)
  • $(#all)
  • $("*")
  • $("all") - correct answers.$("*") The following selector: $("div") selects only the first div element in the HTML document.
  • correct answers.False The following code does the following: when a user clicks on a button, the element with id="test" will be hidden. $(document).ready(function(){ $("button").click(function(){ $("#test").hide(); }); }); - correct answers.True The following selector: $("div") only selects the first div element in the HTML document.
  • correct answers.False What scripting language is jQuery written in?
  • C#
  • Java
  • C++
  • JavaScript - correct answers.JavaScript Which jQuery function is used to prevent code from running, before the document is finished loading?
  • $(document).load()
  • $(document).onready()
  • $(document).ready()
  • $(document).onload() - correct answers.$(document).ready() The XMLHttpRequest object has a property called STATUS. If the STATUS is 404, then the response from the server is ready and everything is okay. - correct answers.False

With AJAX, the JavaScript does not have to wait for the server response, but can instead execute other scripts while waiting for the server response. - correct answers.True JSON is a syntax for storing and exchanging data. It is considered a lightweight data interchange format and a subset of JavaScript. It is considered easy to use and understand and is language independent. - correct answers.True The term ____ refers to the application, usually a Web browser, which makes the request.

  • HTTP server
  • host
  • HTTP URL
  • HTTP client - correct answers.HTTP client A(n) ____ request stops the processing of the JavaScript code until a response is returned from the server.
  • asynchronous
  • global
  • domain
  • synchronous - correct answers.synchronous XML is required for data interchange between client and server in an Ajax application. - correct answers.False JSON stands for the following:
  • JavaScript Object Notation
  • jQuery Source Object Notation
  • JavaScript Open Network
  • Java Source Object Notation - correct answers.JavaScript Object Notation Every Web page is identified by a unique address called the ____.
  • host string
  • host
  • Correct URL
  • HTTP - correct answers.host string The ability for one Web server to access Web pages and data on another Web server is the foundation of the World Wide Web. - correct answers.True The XMLHttpRequest object uses ____ to exchange data between a client computer and a Web server.
  • HTTP
  • FTP
  • HTTPS