The DOM DOM Events 2 years ago user HTML DOM allows JavaScript to react to HTML events: Reacting to Events A JavaScript can…