0

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

Imran Qadir Baksh - Baloch
  • 32,612
  • 68
  • 179
  • 322

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
  • 74,352
  • 26
  • 153
  • 180