button on press code example
Example 1: button functions html
<script>
function myFunction() {
alert("ALERT");
}
</script>
<button onclick="myFunction">Click</button>
Example 2: javascript button
<button onclick="Function()">Text</button>
Example 3: how to make a button in javascript
<button id="btn">button</button>