Question 13.1

  1. Ctrl, Alt and Shift
  2. Event Bubbling
  3. Return Value
  4. Target
  5. click, mousedown, mouseup

Question 13.2

  1. False. The load event fires when an element finishes loading.
  2. True
  3. False. It fires when an element gains focus.
  4. True
  5. False. Returning false prevents the default action.

Question 13.3

  1. Add an erase feature to the drawing program in Fig. 13.3.
    Try setting the background color of the table cell over which the mouse moved to white when the Alt key is pressed
  2. Hold Ctrl to draw blue.
    Hold Shift to draw red.
    Hold Alt to erase.

Question 13.4

  1. 13.4 Add a button to your program from Exercise 13.3 to erase the entire drawing window

Question 13.5

  1. You have a server-side script that cannot handle any ampersands (&) in the form data.
    Write a function that converts all ampersands in a form field to " and " when the field loses focus (blur).