How to find the submit button in a specific form in jQuery

后端 未结 7 2322
执念已碎
执念已碎 2020-12-25 09:37

I try to get jQuery object of a submit button in a specific form (there are several forms on the same page).

I managed to get the form element itself. It looks somet

7条回答
  •  生来不讨喜
    2020-12-25 10:32

    Using plain javascript (without relying on jquery):

    var curSubmit = curForm.querySelector('button[type="submit"]');
    

提交回复
热议问题