Example 1 — Official Demo: input[name*="man"]
Find inputs whose name contains man, then set a new value (jQuery API example).
$("input[name*='man']").val("has man in it!");
var names = $("input[name*='man']").map(function () {
return this.name;
}).get().join(", ");
console.log(names);
// man, human, woman How It Works
- Limit to inputs. The
inputtag keeps the search on form controls. - Apply *=. Any
namethat containsmanmatches. - Set values.
.val()updates every match in one call.

