E-Learning Platform
0 of 139 builtAlways freeSign in
3.08 · Lab

Events

Everything you've written so far ran the instant the page loaded. This one waits for a person — which means reading the value inside the listener, not before it.

Exercise

Wire the greeting button

Checks itself — try as often as you like

Wire up the button on this page:

  • Select #greet-button and add a "click" event listener to it.
  • Inside the listener, read the current value of #name-input, and set #greeting's textContent to "Hello, " + that value + "!".