perform something on click in javascript code example
Example 1: button click function in js
<script>
$(document).ready(function(){
$('#MyButton').click(function(){
CapacityChart();
});
});
</script>
<input type="button" value="Capacity Chart" id="MyButton" >
Example 2: javascript perform click
eventFire(document.getElementById('mytest1'), 'click');