How could I run scripts related with the reset button

How could I run scripts related with the reset button

Thanks for all your support. 

I want to run a function when the user click on the reset button. How could configure that?