LIS 2360 Exam 2 FSU

Ace your homework & exams now with Quizwiz!

Look at the following selector: $("div p"). What does it select? 1. All div elements with a p element 2. The first p element inside a div element 3. All p elements inside a div element 4. None of these.

3. All p elements inside a div element

At the core of DHTML is ____. 1. CSS 2. XML 3. DOM 4. JavaScript

3. DOM

What scripting language is jQuery written in? 1. C++ 2. Java 3. JavaScript 4. C#

3. JavaScript

Look at the following selector: $("p #intro"). What does it select? 1. All p elements with class="intro" 2. All intro elements with id="p" 3. The p element with id="intro" 4. All p elements with id="intro"

3. The p element with id="intro"

A(n) ____ is a software component that resides on a Web server. 1. HTTP service 2. DHTML service 3. Web service 4. AJAX request

3. Web service

The ____ method returns an array of elements that match a specified tag name. 1. getElementsByTagId() 2. getElementsByName() 3. getElementsByTagName() 4. getElementsById()

3. getElementsByTagName()

Which jQuery function is used to prevent code from running, before the document is finished loading? 1. $(document).onload() 2. $(document).load() 3. $(document).onready() 4. $(document).ready()

4. $(document).ready()

With jQuery, look at the following selector: $("div.intro"). What does it select? 1. The first div element with id = "intro" 2. All div elements with id = "intro" 3. The first div element with class = "intro" 4. All div elements with class = "intro"

4. All div elements with class = "intro"

This is one of the most common types of HTTP requests. This method is used for standard web page requests to a server. A query string or form data can be included or appended to the URL request sent to the server. 1. PUT 2. TRACE 3. POST 4. GET

4. GET

"DHTML" refers to a single technology.

False

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.

False

The following example returns a list of all elements where the id="intro" var x = document.getElementsByClassName("intro");

False

The following selector: $("div") only selects the first div element in the HTML document.

False

The following selector: $("div") selects only the first div element in the HTML document.

False

The following statement finds all of the <span> elements in the HTML document: var x = document.getElementsByTagName("p");

False

XML is required for data interchange between client and server in an Ajax application.

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.

True

jQuery uses CSS selectors to select elements?

True

What is the correct jQuery code for making all div elements 300 pixels high? 1. $("div").height(300) 2. $("div").height = 300 3. $("div").yPos(300) 4. $("div").pixel(300)

1. $("div").height(300)

The term ____ refers to the application, usually a Web browser, which makes the request. 1. HTTP client 2. HTTP server 3. host 4. HTTP URL

1. HTTP client

Every Web page is identified by a unique address called the ____. 1. URL 2. host string 3. HTTP 4. host

1. URL

A(n) ____ request stops the processing of the JavaScript code until a response is returned from the server. 1. synchronous 2. domain 3. asynchronous 4. global

1. synchronous

Which of the following features does jQuery library contain? 1. CSS manipulation 2. All are true 3. Effects and animations 4. HTML/DOM manipulation

2. All are true

Through the ____ object you can access other objects that represent elements on a Web page. 1. Input 2. Document 3. Image 4. Element

2. Document

The XMLHttpRequest object uses ____ to exchange data between a client computer and a Web server. 1. FTP 2. HTTP 3. HTTPS 4. SSL

2. HTTP

JSON stands for the following: 1. JavaScript Open Network 2. JavaScript Object Notation 3. Java Source Object Notation 4. jQuery Source Object Notation

2. JavaScript Object Notation

The ____ property of the Image object allows JavaScript to dynamically change an image. 1. path 2. src 3. file 4. img

2. src

Which sign does jQuery use as a shortcut for jQuery? 1. the & sign 2. the $ sign 3. the ? sign 4. the % sign

2. the $ sign

The following jQuery statement will select all of the elements on the HTML document. 1. $("all") 2. $(#all) 3. $("*") 4. $(.*)

3. $("*")

What is the jQuery statement that will hide all <p> elements in an HTML document? 1. $("#p").hide() 2. $(".p").hide() 3. $("p").hide() 4. None of these

3. $("p").hide()

What is the correct JavaScript syntax to change the content of the HTML element below? <p id="demo">This is a demonstration.</p> 1. #demo.innerHTML = "Hello World!"; 2. document.getElementByName("p").innerHTML = "Hello World!"; 3. document.getElement("p").innerHTML = "Hello World!"; 4. document.getElementById("demo").innerHTML = "Hello World!";

4. document.getElementById("demo").innerHTML = "Hello World!";

Which of the following is the correct syntax for accessing an element with the id value headline? 1. document.getElementById(headline) 2. document.getElementsById("headline") 3. document.getElementByID("headline") 4. document.getElementById("headline")

4. document.getElementById("headline")

Which of the following is the correct syntax for accessing the value of the href attribute for the third a element in a document? 1. document.getElementByTagName("href")[3] 2. document.getElementByID=d("a").href 3. document.getElementByTagName("a")[3].href 4. document.getElementByTagName("a")[2].href

4. document.getElementByTagName("a")[2].href

AJAX primarily relies on JavaScript and HTTP requests to exchange data between a client computer and a Web server.

True

An HTTP response message returns to the client the message and the status code. If the status code is 200, then the request was successful.

True

Each element on a Web page is represented in the HTML DOM by its own object.

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.

True

The DOM is a W3C (World Wide Web Consortium) standard.

True

The ability for one Web server to access Web pages and data on another Web server is the foundation of the World Wide Web.

True

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(); }); });

True

The getElementsByName() method always returns an array, even if there is only one element in the document with a matching name attribute.

True

The innerHTML property is used to get or replace the content of an HTML element.

True


Related study sets

Unit 6 Financial Goals/Objectives

View Set

2.7 Ionic bonds are attractions between ions of opposite charge

View Set

american history chapter 16 practice quiz

View Set

CNET 110 Introduction to Information Technology

View Set

Module 14: A Universe of Galaxies: Fundamentals of Cosmology

View Set

Frankenstein Chapters 17, 18, And 20 For Quiz

View Set