Questions: I'm attempting to use jQuery to capture a submit event and then send the form elements formatted as JSON to a PHP page. I'm having issues capturing the submit though, I started with a .click() event but moved to the .submit() one instead. I now have the following trimmed down code. HTM The submit event is sent to an element when the user is attempting to submit a form. It can only be attached to <form> elements. Forms can be submitted either by clicking an explicit <input type=submit>, <input type=image>, or <button type=submit>, or by pressing Enter when certain form elements have focus
The target property can be the element that registered for the event or a descendant of it. It is often useful to compare event.target to this in order to determine if the event is being handled due to event bubbling. This property is very useful in event delegation, when events bubble jQuery References jQuery Overview jQuery Selectors jQuery Events jQuery Effects jQuery HTML/CSS jQuery Traversing jQuery AJAX jQuery Misc jQuery Properties. jQuery :submit Selector jQuery Selectors. Example. Select <input> and <button> elements with type=submit: $(:submit) Try it Yourself » Definition and Usage. The :submit selector selects button and input elements with type=submit. If a.