Answers for "javascript perform click on button"

4

button click function in js

<script>
  $(document).ready(function(){
    $('#MyButton').click(function(){
       CapacityChart();
    });
  });
</script>

<input type="button" value="Capacity Chart" id="MyButton" >
Posted by: Guest on May-27-2020
-1

javascript perform click

function eventFire(el, etype){
  if (el.fireEvent) {
    el.fireEvent('on' + etype);
  } else {
    var evObj = document.createEvent('Events');
    evObj.initEvent(etype, true, false);
    el.dispatchEvent(evObj);
  }
}
Posted by: Guest on May-06-2020
-2

javascript perform click

eventFire(document.getElementById('mytest1'), 'click');
Posted by: Guest on May-06-2020

Code answers related to "javascript perform click on button"

Browse Popular Code Answers by Language