The :submit selector matches every submit-type form control — input[type=submit] and button[type=submit]. Available since jQuery 1.0; always specify type on buttons for cross-browser consistency.
01
Syntax
:submit
02
Post form
Send data
03
Official
td :submit
04
vs :button
Different type
05
type=
Always set
06
Native CSS
Faster query
Fundamentals
Introduction
Every HTML form needs a way to send data — submit buttons trigger the browser’s form submission. jQuery’s :submit pseudo-class selects every control whose type is submit, whether rendered as an <input> or a <button>.
Official jQuery documentation notes that some browsers treat <button> as submit implicitly while others do not — always write an explicit type attribute. The official demo finds td :submit descendants, styles their parent cells, and reports the match count.
Concept
Understanding the :submit Selector
Think of :submit as “which controls will post this form?”:
input[type=submit] → classic submit input.
button[type=submit] → submit styled as a button tag.
input[type=button] → no match — use :button.
input[type=reset] → no match — use :reset.
💡
Beginner Tip
Use type="button" for JavaScript-only actions and type="submit" for form posting — then :submit and :button never overlap on inputs.
Form action controls — each type has its own jQuery pseudo-class.
:submit
:submit
Post form data
:button
:button
Plain buttons
:reset
input:reset
Clear defaults
Native CSS
input[type="submit"]
Official perf tip
Hands-On
Examples Gallery
Example 1 follows the official jQuery td :submit demo. Examples 2–5 cover contrast with :button, native attribute selectors, scoped form queries, and preventing double submission.
📚 Official jQuery Demo
Style parent cells of every submit control in a table.
Example 1 — Official Demo: td :submit
Official jQuery demo — highlight td cells containing submit controls and report the count.
Performance — prefer attribute selectors over bare :submit.
🧠 How jQuery Evaluates :submit
1
Parse selector
Combine a scope (form, td) with :submit.
Query
2
Find candidates
Collect elements in scope — or all nodes if bare :submit.
Scan
3
Filter by type
Keep inputs with type=submit and submit-type buttons.
Match
4
✓
Return collection
Chain .prop(), .on("click"), or styling methods.
Important
📝 Notes
Available since jQuery 1.0 — for submit-type inputs and buttons.
jQuery extension — not valid in native querySelectorAll(":submit").
Always specify type on <button> elements (official docs).
input[type=submit] matches :submit, not :button.
button[type=submit] matches both :submit and :button.
Official native alternative — input[type="submit"], button[type="submit"], button:not([type]).
Compatibility
Browser Support
The :submit pseudo-class is a jQuery extension and works in jQuery 1.0+. Submit behavior is standard HTML in all browsers; use attribute selectors for native querySelectorAll as jQuery docs recommend.
✓ jQuery 1.0+ · extension
jQuery :submit Selector
Form submit controls — always set type on buttons.
100%jQuery + native attr
Google ChromeAll versions · Desktop & Mobile
Full support
Mozilla FirefoxAll versions · Desktop & Mobile
Full support
Apple SafariAll versions · macOS & iOS
Full support
Microsoft EdgeAll versions · Chromium & Legacy
Full support
Internet ExplorerIE 6+ · Legacy environments
Full support
OperaAll modern versions
Full support
:submitUniversal
Bottom line: Scope with form :submit; prefer input[type="submit"] for native speed.
Wrap Up
Conclusion
The :submit selector matches every form control that posts data — the official demo finds them inside table cells and reports the match count.
Always write explicit type attributes on buttons, and use native attribute selectors when performance matters.
Write type="submit" or type="button" on every button
Scope with $("#form :submit")
Disable :submit after first post to prevent duplicates
Use attribute selectors for native performance
Distinguish :submit from :button in form logic
❌ Don’t
Leave <button> without a type attribute
Use bare $(":submit") on large pages
Expect :submit in querySelectorAll
Confuse :submit with :reset or :button on inputs
Disable all :button when you meant to keep submit enabled
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about :submit
Post the form.
5
Core concepts
➤01
:submit
Post form
API
type02
Set type
Always
Rule
btn03
≠ :button
On inputs
Tip
td04
Official
Table demo
Compare
CSS05
Native
[type=]
Demo
❓ Frequently Asked Questions
:submit selects every form control whose type is submit — typically input[type="submit"] and button[type="submit"]. Official jQuery docs note it applies to button or input elements. Available since jQuery 1.0.
:submit matches submit-type controls that post the form. :button matches button tags and input[type="button"] plain buttons. input[type="submit"] matches :submit, not :button — but a button tag with type="submit" matches both :button and :submit.
Yes. Official jQuery docs warn that some browsers treat button as type="submit" implicitly while others do not. Always specify type="submit" or type="button" for consistent markup and reliable selector matching.
Official docs recommend input[type="submit"], button[type="submit"], button:not([type]) for querySelectorAll performance instead of the jQuery :submit extension.
The official demo runs $("td :submit"), styles the parent td cells yellow with a red border, and reports how many submit elements matched — typically two in the sample table (input submit + button type="submit").
:submit matches controls that send form data to the server. :reset matches input[type="reset"] controls that restore default field values. Each maps to a different input type.
Did you know?
A single HTML form can contain multiple submit controls — for example a “Save draft” and “Publish” button. Clicking either one submits the form, but only the clicked button’s name and value are included in the POST data. jQuery’s :submit finds every such control so you can style or disable them together.