2 of 1 ·Button interaction

Lesson 2 · Web Explorer
Making something happen on click.
Make the Page Interactive
JavaScript can react to a click. Run a button that changes a message. Change only the message first; build a counter once you can explain the click action.
Click to zoomTwo chapters ago you built a <button>, clicked it, and nothing happened. You were told that was normal.
Time to fix it.
A click event in JavaScript is the same idea as when this sprite clicked in Scratch: when this happens, run these instructions. Only the writing has changed.
9 more parts in this lesson
Walkthroughs, code labs, mini-games and the checkpoint quiz unlock when you buy the course.