javascript - Get values of Input[type=(type)] from specific class with jQuery -
i have code not work:
kw _class = _keyword1; var text = $("'input." + kw_class + "[type=text]'").val(); var val = $("'input." + kw_class + "[type=hidden]'").val();
firefox console comes out this:
`syntax error, unrecognized expression: 'input._keyword1[type=text]'
i have tried @ least 3 combos of not working found other questions.
yes because have ' ' inside of selector. should be:
var text = $("input." + kw_class + "[type=text]").val(); var val = $("input." + kw_class + "[type=hidden]").val();
Comments
Post a Comment