jquery - Trying to find a value doesnt work with a variable -
idk if i'm overlooking can work:
var scu = 0291285; $('input[value=scu]').val('changed'); nothing happens, when try:
$('input[value=0291285]').val('changed'); the input value of 0291285 changes. method not take var, , if there work around this?
jquery not know scu local variable have declared. thinks want <input> value string literal 'scu'. want this:
$('input[value=' + scu.tostring() + ']').val('changed');
Comments
Post a Comment