Web development · The DOM and events
Every button that does something on a page works the same way: the script hands the browser a function to call later.