0

How to get Element(button/input) Submitting the form in Form Submit event?

Imran Qadir Baksh - Baloch
  • 30,546
  • 66
  • 170
  • 302

1 Answers1

1

You can't. Instead you should bind an event handler to all :submit elements within the form, and do your work from there.

$(document).on('click', ':submit', function () {
    // this is the element that was clicked!
});
Matt
  • 72,564
  • 26
  • 147
  • 178