Perform Javascript action after reset button handles click

后端 未结 4 1024
天命终不由人
天命终不由人 2021-02-09 15:57

How do I perform an action immediately after an has already reset the form elements?

4条回答
  •  谎友^
    谎友^ (楼主)
    2021-02-09 16:41

    Write code/events which you wanted to call in middle of this function. I have tested this. Working good.

    $(document).ready(function() {
        $("input:reset").click(function() {       // apply to reset button's click event
            this.form.reset();                    // reset the form
    
            // call your functions to be executed after the reset      
    
             return false;                         // prevent reset button from resetting again
        });
    });
    

提交回复
热议问题