Resetting a multi-stage form with jQuery

前端 未结 30 2008
谎友^
谎友^ 2020-11-22 00:58

I have a form with a standard reset button coded thusly:


Trouble i

30条回答
  •  旧巷少年郎
    2020-11-22 01:31

    I find this works well.

    $(":input").not(":button, :submit, :reset, :hidden").each( function() {
        this.value = this.defaultValue;     
    });
    

提交回复
热议问题