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

后端 未结 9 1745
情歌与酒
情歌与酒 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:38

    Change this:

     

    To this:

     

    Then the following should work:

    $("#fetch_results input").each(function() {
          this.value = "";
      })​
    

    http://jsfiddle.net/NVqeR/

提交回复
热议问题