Ann
Ann

Reputation: 37

Select inputs with jquery

How can I select input fields with names like name="myinput[something][etc]" ?

$('input[name=myinput[something][etc]') doesnt seem to work...

Upvotes: 1

Views: 75

Answers (3)

Wahid4sap
Wahid4sap

Reputation: 227

$('input[name="myinput[something][etc]"]')

if want to select by id, then it must be

$('input[id=""]')

hope this....

Upvotes: -1

SeanCannon
SeanCannon

Reputation: 77956

$('input[name="myinput[something][etc]"]');

Upvotes: 0

Daniel A. White
Daniel A. White

Reputation: 190905

Just give them id attributes. It will save you a lot of grief.

Or you could try $('input[name="myinput[something][etc]"]')

Upvotes: 4

Related Questions