Friday Morning Review Questions


Let us see how much you have learned yesterday by going over these review questions.

  1. What is the definition of DHTML?
    1. A combination of Java 2.0, and CSS
    2. HTML that changes using smoke and mirrors
    3. A combination of HTML 4.0, JavaScript and CSS
    4. None of the above.

  2. In the
    function doTxt(item),
    what property is used in the alert() to display to the browser the value stored in the text box named user?
    <input type=”text” name=”user” onChange=”doTxt(this)>
    1. alert(item.value)
    2. alert(this)
    3. prompt(item.value)
    4. Any of the above

  3. Does IE follow the same standards as Netscape when writing DHTML?
    1. Yes.
    2. No.
    3. When pigs fly or when Netscape 6.1 and Explorer 6 get it fiquired out.
    4. None of the above.

  4. How do you define style sheet rules?
    1. <head> <style> …</style> tags.
    2. Use an external file reference with the <link rel=”stylesheet” href=”food.css> tag.
    3. In line style rule <h1 style=”font-size: 26pt”>.
    4. All and any of the above.

  5. Do cookies pose a serious security risk?
    1. Yes.
    2. Sometimes.
    3. No.
    4. None of the above.

  6. What are the four cookie attributes??
    1. Chocolate,Dough,Peanut Butter and Macaroon
    2. set,delete,duration,domain
    3. (SPED to get my cookies): secure, path, expires, domain
    4. None of the above

  7. What are the two requirements to delete a cookie?
    1. 1.Do not delete, 2.eat them.()
    2. 1.Cookie must match your domain and path, 2. delCookie()
    3. 1. Set value to 0 and 2. expires to past date and ()
    4. 1. Set value to null and 2. expires to past date and time()
    5. none of the above

  8. What is the code to create a class style rule named myBox to position a container exactly at the most top-left corner of the browser window?
    1. .myBox { position: relative; left:0 top:0 }
    2. class=myBox { position: absolute; left:0 top:0 }
    3. .myBox { position: absolute; left:0 top:0 }
    4. None of the above

  9. For both IE and Netscape -- in the function scroll(), what is the code to position a container named scrollingText to exactly 10 pixels from the top?
    1. function scroll() { if (ie) document.all.scrollingText.style.top = 10; If (netscape) document.scrollingText.top = 20 }
    2. function marquee() { if (ie) document.all.scrollingText.style.top = 10; Else (netscape) document.scrollingText.top = 20 }
    3. function scroll(position) { if (ie) document.all.scrollingText.style.top = 10; If (netscape) document.scrollingText.top = 20 }
    4. Any of the above

  10. Given this :
    <div id="message">Happy Birthday</div>
    What is the code in IE to dynamically change the contents of the message container to Congratulations displayed in bold? <b>Congratulations</b>
    1. document.all.message.innerHtml.bold = "<b>Congratulations</b>";
    2. document.all.message.innerHtml = "<b>Congratulations</b>";
    3. document.(this).message.innerHtml = "<b>Congratulations</b>";
    4. None of the above

  11. In order to implement collapsible outlines, what style rule causes an HTML element to disappear and close up space?
    1. display:hidden
    2. display:none
    3. display:visible
    4. Any of the above

  12. What low-level browser events are used when dragging an HTML component across the page?
    1. Same in both IE and NS MouseUp, MouseDown, MouseMove.
    2. Different in both IE and NS. for IE onMouseUp, onMouseDown, onMouseMove,for NS MouseUp, MouseDown, MouseMove
    3. Same in both IE and NS onMouseUp, onMouseDown, onMouseMove.
    4. None of the above

    each event executes a function

  13. What are the three storage limitations of cookies stored by the browser?
    1. 1. Max 20 cookies per mouthfull, 2. size < 4lbs, 3. total approx 300 cookies per meal
    2. 1. Max 200 cookies per web application, 2. size < 40KB, 3. total approx 3000 cookies per browser
    3. All of the above
    4. 1. Max 20 cookies per web application, 2. size < 4KB, 3. total approx 300 cookies per browser

  14. Where should function definitions be placed in the HTML code and why?
    1. Always place your code outside the <html> tags, thebrowser likes that
    2. <body> functions need to be close to what you want effected
    3. <head> HTML parses the code sequentially, therefore the head section always loads first
    4. None of the above.

Thanks To All of You in the Learning Tree 489 JavaScript class -
Cheers!