:reset (since jQuery 1.0) selects every element of type reset — the control that restores a form to its initial defaults. Official docs state it is equivalent to [type="reset"]. Prefer $("input:reset") over bare $(":reset").
Remember
$("input:reset") // reset inputs (official style)
$("form input:reset") // reset inside a form
$("input[type=reset]") // equivalent attribute form
// Avoid on large pages:
$(":reset") // implies *:reset
// Clicking reset restores form defaults (browser behavior)
Prefix with input, scope to a form, then style, count, or bind a confirm-before-reset handler.
Write $("input:reset") — avoid bare $(":reset") on large pages.
Scope to a form: $("#signup input:reset").
Style or disable the control with normal jQuery methods.
For custom UX, listen for click and call preventDefault() when the user cancels.
For hot paths, prefer input[type="reset"] so the browser can optimize.
Piece
Required?
Role
Selector string
Yes
:reset filter (best with an input prefix)
Form / context
Optional
Limits the search to one form
Event handler
Optional
Confirm, analytics, or custom clear logic
Return value
—
jQuery collection of matching reset controls (may be empty)
Pseudocode
Pseudocode
matches = []
for each element in search context:
if element.type is "reset":
matches.add(element)
return matches
// Optional follow-up:
on click(reset):
if user confirms → allow native form reset
else → preventDefault()
Reference
Cheat Sheet
Keep these facts handy while selecting reset buttons.
Topic
Detail
Syntax
$("input:reset")
Since
jQuery 1.0 · jQuery extension
Equivalent
$("[type=\"reset\"]")
Matches
Elements with type="reset"
Native click
Restores that form’s default values
vs :submit
Reset clears; submit sends
vs :button
Different control types
Native CSS
Use [type="reset"] for speed
Try it
Live Preview
Run different selectors against a small sample form and see how many reset controls match.
Sample markup mirrors the official jQuery form demo, plus a <button type="reset"> for comparison.
Filter. Text, submit, and checkbox controls are ignored.
Count..length is how many reset inputs matched.
Report. The message mirrors the official jQuery demo wording.
Example 2 — Equivalence: :reset vs [type=reset]
Official docs — both forms select the same type of control.
jQuery
var a = $("input:reset").length;
var b = $("input[type=reset]").length;
console.log("input:reset →", a);
console.log("[type=reset] →", b);
console.log("same set?", a === b);
reset: 1
submit: 1
Labels become "Clear form" and "Send form"
How It Works
Reset filter.:reset keeps only reset inputs.
Submit filter.:submit keeps only submit inputs.
No overlap. A single input has one type — it cannot match both.
Labels. Updating value shows which control each selector hit.
Example 4 — Confirm Before Reset
Ask the user before the browser restores the form defaults.
jQuery
$("form input:reset").on("click", function (e) {
if (!window.confirm("Clear this form?")) {
e.preventDefault();
$("#out").text("Reset cancelled.");
} else {
$("#out").text("Form will reset to defaults.");
}
});
Cancel confirm → "Reset cancelled." (fields keep values)
OK confirm → form clears to defaults
How It Works
Scope.form input:reset targets the reset control in that form.
Intercept. The click handler runs before the native reset.
Cancel.preventDefault() stops the browser from clearing fields.
Allow. If the user confirms, the default reset behavior continues.
Example 5 — Native Performance: input[type="reset"]
Official tip — use the attribute selector so modern browsers can optimize.
jQuery
var $resets = $("input[type='reset']");
$("#out").text("Found " + $resets.length + " reset via [type=reset]");
// Pure DOM (no jQuery pseudo-class):
// document.querySelectorAll("input[type='reset']")
Found 1 reset via [type=reset]
Works in querySelectorAll — no :reset extension needed
How It Works
Standard CSS.[type="reset"] is valid in native selectors.
Same matches. You still get every reset input.
Engine boost. jQuery can hand the query to querySelectorAll.
When to switch. Prefer this form on large pages or frequent re-queries.
Edge Cases & Pitfalls
Check these before relying on :reset in real forms.
slow
Bare $(":reset") scans everything
It implies *:reset. Prefer $("input:reset") or a form-scoped query.
non-std
Not valid in querySelectorAll
:reset is a jQuery extension. Use input[type="reset"] for native CSS queries.
button
<button type="reset"> vs input:reset
$("input:reset") skips <button type="reset">. Use [type=reset] when both markup styles must match.
action
Selecting ≠ clearing
:reset finds the control. The browser performs the clear on click unless you preventDefault().
Compatibility
Browser Support
The :reset pseudo-class is a jQuery extension and has worked since jQuery 1.0. The equivalent input[type="reset"] attribute selector is standard CSS and runs in native querySelectorAll.
✓ jQuery 1.0+ · extension
jQuery :reset Selector
Supported across jQuery 1.x, 2.x, and 3.x wherever your jQuery build runs. Prefer input:reset; use input[type="reset"] for native speed.
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
:resetUniversal
Bottom line: Safe everywhere jQuery runs. Scope with form input:reset; prefer [type="reset"] when performance matters.
Analysis
Performance Notes
Approach
Cost
Best for
$("input[type=\"reset\"]")
Fastest
Modern browsers / hot paths
$("input:reset")
Cheap
Typical tutorials and small forms
$("#form input:reset")
Cheaper
Multi-form pages
$(":reset")
Slower
Avoid — universal scan
Official jQuery docs note that because :reset is not CSS, it cannot use the querySelectorAll boost. Prefer [type="reset"] when the page is large or you re-query often.
Remember
Key Takeaways
Role: select form controls with type="reset".
Prefix: use $("input:reset"), not bare $(":reset").
Action: the browser clears the form on click — the selector only finds the control.
Speed: prefer [type="reset"]; pair with :submit when styling form actions.
One line:$("input:reset") finds reset buttons — scope to a form, confirm before clear when needed, and use [type="reset"] for native speed.
Frequently Asked Questions
:reset selects every element whose type is reset — usually an input that restores a form to its initial defaults. $("input:reset") finds reset inputs in the search context. Available since jQuery 1.0.
Prefer $("input:reset"). Bare $(':reset') implies the universal selector and scans as $('*:reset'), which is slower on large pages. Official demos use input:reset.
Yes. Official docs state that :reset is equivalent to [type="reset"]. For native querySelectorAll performance, prefer input[type="reset"] over the :reset pseudo-class.
:reset matches type=reset. :submit matches submit controls. :button matches button-type controls (and <button> tags in the :button selector). They select different form controls — no overlap for a single input’s type.
The browser restores every control in that form to its initial default values. :reset only selects the reset control itself — it does not perform the reset. Use a click handler if you need custom confirm-before-reset behavior.
No. It is a jQuery extension (not part of the CSS specification), so queries using :reset cannot use the native querySelectorAll boost. Use [type="reset"] when performance matters.