Answers for "connect function to html buttons"

0

how to add function to button in html

<script>
 function myFunction() {
   alert("ALERT");
 }
</script>
<button onclick="myFunction()">Click</button>
Posted by: Guest on February-14-2022

Browse Popular Code Answers by Language