jQuery .not(), multiple excludes with id

前端 未结 1 1781
傲寒
傲寒 2020-12-31 03:29

I got this small piece of code to reset a form:

$(\"#reset\").click(function() {
    $(\':input\',\'#fundingpossibility\')
    .not(\':button, :submit, :rese         


        
相关标签:
1条回答
  • 2020-12-31 04:02

    Just add another comma (multiple selector), for example:

    $("#reset").click(function() {
      $(':input','#fundingpossibility')
      .not(':button, :submit, :reset, :hidden, #test')
      .val('');
    });
    
    0 讨论(0)
提交回复
热议问题