+ 1

How do I add a "OnButtonPress" code to JavaScript?

I know i'm being kinda lazy by asking this without going through the whole tutorial, but i'm very impatient, and I want to know. I know ya'll are very smart, is why i'm asking.

25th May 2018, 12:49 AM
Tyler Howell
Tyler Howell - avatar
2 Answers
+ 3
<button onclick="onButtonPress()"> CLICK HERE </button> <script> function onButtonPress(){ alert("Hello!"); } </script>
25th May 2018, 1:39 AM
Jonathan Pizarra
Jonathan Pizarra - avatar
+ 1
Thank you
25th May 2018, 1:44 AM
Tyler Howell
Tyler Howell - avatar