Button Click Event

Example reacting to a button click.

Preview

Code

<button onclick="document.body.style.background='lightyellow';">
Change Background
</button>

More HTML JavaScript Examples (7)