How To: jQuery - Select Element By Name

subscriptTo select an element by name, use the attribute selector.

Syntax

$("selector[attribute='value']")

Example

Get an element with a name of color

$("*[name='color'])

Example

Get an input element with a name of color

$("input[name='color']")
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License