O'Reilly logo
  • Ahmed Elgendy thinks this is interesting:

To add a handler to deal with clicks on the image, we simply assign a function to the image’s onclick property. Let’s call that function showAnswer, and we’ll define it next.

image with no caption

Now we need to write the showAnswer function, which un...


Cover of Head First JavaScript Programming


How to have the event handler change the property of an element?