How to Call a Button Click on Other Function or Event

Suppose we have a button reset and we have written the code on his event and we want to fire same click on other event or function.

Then we can trigger his event on other function.

  1. <button value="Reset" id="btnReset" title="Reset" type="reset">RESET</button>  
So if just we want to call the reset functionality on other function, then simply we just trigger the click event on that function.
  1. function resetAgain() {    
  2.         int count=0;    
  3.         $("#btnReset").trigger("click");    
  4.     }  
By calling the resetAgain() reset will again fired.