+ 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.
2 Answers
+ 3
<button onclick="onButtonPress()"> CLICK HERE </button>
<script>
function onButtonPress(){
alert("Hello!");
}
</script>
+ 1
Thank you