Learn Create Your Own Split Screen

Next Page

Now we'll add some Javascript and define that function.

As you know, Javascript exists inside a <script> tag.

<script> function DoMyThing() { alert("I got clicked"); } </script>
We can put the script tag pretty much anywhere we like. But remember:

Our function is just going to display an "alert box", so we know it's working.


Try clicking the button.

When the alert flashes up, if your browser includes an option similar to "don't display this dialog ever again", be sure not to select it !