Possible questions for quiz 2, cpsc 470S

From MWCSWiki

Jump to: navigation, search

Quiz 2

1. Which of the following is not a CSS property?

a. color
b. font-size
c. div
d. background


2. Given the following CSS rules:

.class1 { color: orange; }
.class2 { border: solid blue 1px; backround-color: cyan }

Which line will create the word "text" in orange with a cyan box and blue border?

a. <div class='class1'&rt; text /div &rt;
b. div class='class2' text /div
c. div class='class2 class1' text /div
d. div class='class1+2' text /div

3. p, b#banner {color: green;} The preceding CSS code makes it so that:

a) All elements inside of a paragraph tag that are also within a bold tag that has the class name "banner" are turned green.
b) All elements inside of a paragraph tag and all elements inside of a bold tag with the id "banner" are turned green.
c) All elements inside of a paragraph tag and all elements inside of bold tags with the class name "banner" are turned green.
d) All elements inside of a paragraph tag that are also within a bold tag that has the id "banner" are turned green.

4. In order to be executed, Javascript is:

a) compiled
b) assembled
c) interpreted
d) fragged

5. One of the drawbacks of overwriting the .innerHTML property of a node is that:

a) Any HTML code it contains is not added to the DOM.
b) The .innerHTML property can only contain a maximum of 100 characters.
c) All text in the .innerHTML property can only be displayed in a monospace font.
d) No code in the.innerHTML property can be affected by a CSS.old tag that has the class name "banner" are turned green.

Matching


JavaScript    A  can move it about, resize it, and hide it altogether, 
                 while the page is visible

DOM           B  fashionable way to talk to the server

CSS           C  important in advanced Ajax applications

maintaining a  D keep a clear programmatic view of the of the user 
separation of    interface 
responsibilities

XMLHttpRequest  E keeps structure separate form  visual styling

an element in   F powerful general-purpose programming language with a  
the DOM tree      bad reputation

coco.childNodes G represents coco's children as markup

document.
getElementById('coco') H returns a DOM node with whose id is coco

coco.classname   I  returns an array of nodes parented by  coco

coco.innerHTML   J  used for to apply presentation rules to coco

6. Which of the following is not true about CSS

a) Styles can be declared in a .css file.
b) Styles can be declared inside an html tag with the style attribute.
c) Styles can be declared in the head of an html document.  
d) Styles can be declared in only one location.

7. What does the boolean attribute do for XMLHttpRequest.open(mode,type,boolean)

a) It makes the request asynchronously.
b) It makes the request synchronously.
c) It forces the browser to not change pages after executing the request. 
d) It forces the browser to change pages after executing the request.

8. How many ready states does the XMLHttpRequest Object have?

a) 2
b) 3
c) 4
d) 5

9. What method will add a child node to an existing HTML element in the DOM?

a) .addNode()
b) .appendChild()
c) .addChild()
d) .appendNode()

10. What method do we use to find a node in the DOM?

a) .getElementById()
b) .getNodeByName()
c) .getElementByName()
d) .getNodeById()

11. What is the difference between the GET method and the POST method when making a call to the server?

a) The GET method hides passed parameters and the POST method appends the parameters to the end of the URL.
b) The POST method hides passed parameters and the GET method appends the parameters to the end of the URL.
c) The POST method posts the parameters to the server and the GET method gets the parameters from the server.
d) The GET method gets the headers of the url, and the POST method posts the headers of the URL.