I开发者_StackOverflow中文版 created this somewhere in perl:
print qq|<td><input type="checkbox" name="dbtableselect" value="$row[0]"/></td>|;
I tried this syntax but it isn't working. what is the correct syntax format?
var keyid = \$(this).attr('name').match(/\d+/g);
\$('input[type=checkbox,name=dbtableselect,value=' + keyid + ').attr('checked', true);
Those are Attribute Equals Selectors. Each attribute comparison goes into it's own pair of square brackets, like this:
$('input[type=checkbox][name=dbtableselect][value=' + keyid + ']').attr('checked', true);
Try: $('input[type=checkbox][name=dbtableselect][value=' + keyid + ']')
.
精彩评论