Learn Create Your Own Split Screen

Next Page

There's a couple of ways to add a click handler, but the method we'll use is to include an attribute in the HTML
<button onclick="DoMyThing()">
The effect is to call a Javascript function called DoMyThing, whenever the button is clicked.

A couple of important things to note:


Try clicking the button. It still doesn't work because we haven't defined that function yet.