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

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -