html buttons call javascript method code example
Example 1: button functions html
<script>
function myFunction() {
alert("ALERT");
}
</script>
<button onclick="myFunction">Click</button>
Example 2: button click function in js
<script>
$(document).ready(function(){
$('#MyButton').click(function(){
CapacityChart();
});
});
</script>
<input type="button" value="Capacity Chart" id="MyButton" >