How to clear all input fields in a specific div with jQuery?

后端 未结 9 1786
情歌与酒
情歌与酒 2020-12-12 22:11

I am trying to use jQuery to do a simple thing: clear the input fields of a group of input field within a div whenever the form loads, or if the user changes a picklist; but

9条回答
  •  感动是毒
    2020-12-12 22:29

    $.each($('.fetch_results input'), function(idx, input){
      $(input).val('');
    });
    

提交回复
热议问题