jQuery append() and remove() element

后端 未结 2 696
抹茶落季
抹茶落季 2020-12-23 13:44

I have a form where I\'m dynamically adding the ability to upload files with the append function but I would also like to be able to remove unused fields. Here is the html m

2条回答
  •  时光说笑
    2020-12-23 14:34

    You can call a reset function before appending. Something like this:

        function resetNewReviewBoardForm() {
        $("#Description").val('');
        $("#PersonName").text('');
        $("#members").empty(); //this one what worked in my case
        $("#EmailNotification").val('False');
    }
    

提交回复
热议问题