LU06.S02 - Events - increment and decrement

Source-code of the solution

Solution of the assignment

Assignments

  1. Test the code example provided to you. Describe the behaviour of the script using HTML comments.
  2. Make sure that you have the title <h1> correctly named: lu06.s02.html
  3. Change the caption of the Moose-Button to + 1 Moose .
  4. Similiarily to the Moose-Button add another button -1 Moosewhich counts down.
  5. Add another 2 buttons +5 Moose and -5 Moose which count up respectively down by step-size 5
  6. Add another 2 buttons +10 Moose and -10 Moose which count up respectively down by step-size 10
  7. Add another button Reset which resets the counter to 0.
  8. Save your script in webstorm in the directory 06_events and adjust the path to the image.
  9. Test your script for correctness

 Solution executed in the W3School-Sandbox

 Solution executed in the Webstorm

Vocabulary

English German
step-size Schrittweite

Volkan Demir