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

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

    Just had to delete all inputs within a div & using the colon in front of the input when targeting gets most everything.

    $('#divId').find(':input').val('');
    

提交回复
热议问题