Submit selector
The :submit selector selects elements with the type submit, which are form submit buttons. Typically, the :submit selector is applied to buttons or input elements. It is important to remember that some browsers treat the button element as having [type='submit'] implicitly, while others do the opposite. To ensure proper operation, always specify the type property. Since :submit is not part of the CSS specification, it is better to use [type='submit'] instead for better performance in modern browsers.
Syntax
This is how we select elements with type submit:
$(':submit');
Example
Let's, according to the theory above, select all elements with the type submit that are descendants of td elements. Let's give these td a green background and a red border using the css method:
<form>
<table border="1" cellpadding="10" align="center">
<tr><th>Element</th></tr>
<tr><td><input type="button" value="button"></td></tr>
<tr><td><input type="file"></td></tr>
<tr><td><input type="password"></td></tr>
<tr><td><button>button</button></td></tr>
<tr><td><input type="reset"></td></tr>
<tr><td><input type="submit"></td></tr>
<tr><td><input type="radio" name="test"></td></tr>
<tr><td><input type="checkbox"></td></tr>
<tr><td><button type="submit">button</button></td></tr>
<tr><td><input type="text"></td></tr>
</table>
</form>
$('td:submit')
.parent('td')
.css({background: 'green', border: '2px red solid'})
.end();
$('form').submit(function(event) {
event.preventDefault(); // prevents form submission
});