Questions

  1. You access the text color of an element in JavaScript using obj.style.color, but no value is returned. You know it’s been set in a stylesheet. Why is there no returned value, and how would you change the application to get a value?

  2. Given text in a DIV block, how would you change it to display in a 14pt font, with a red color and a line height of 16pt?

  3. If the above change didn’t work, what could be causing the effect to fail?

  4. What are two ways to cause a block to disappear?

  5. If drag and drop isn’t an effective shopping-cart technique, what DHTML effect would be handy for this type of service?

Answers are provided in the appendix.

Get Learning JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.