Example 1 — Official Demo: form input:text
Count text inputs in a form (jQuery API example idea).
var input = $("form input:text");
$("#count").text("For this type jQuery found " + input.length + ".");
$("form").on("submit", function (e) { e.preventDefault(); }); How It Works
- Scope.
form input:textsearches text inputs inside the form. - Filter. Password and submit controls are ignored.
- Count.
.lengthis how many text inputs matched.

