javascrip button click event code example
Example 1: javascript onclick
document.getElementById("Save").onclick = function ()
{
alert("hello");
//validation code to see State field is mandatory.
}
Example 2: button click function in js
<script>
$(document).ready(function(){
$('#MyButton').click(function(){
CapacityChart();
});
});
</script>
<input type="button" value="Capacity Chart" id="MyButton" >