html button javascript

JavaScript
<button onclick="Function()">Text</button><script>
  $(document).ready(function(){
    $('#MyButton').click(function(){
       CapacityChart();
    });
  });
</script>

<input type="button" value="Capacity Chart" id="MyButton" ><element onclick="myScript">
 object.onclick = function(){myScript};
 
 
Source

Also in JavaScript: