I'm havin开发者_如何转开发g trouble passing a variable in the following
var whichRbClicked = $('input:radio[name=RBname]:checked').val();
where RBname is the variable.
Any help or advise would be MUCH appreciated. TIA
Should be:
var whichRbClicked = $('input:radio[name=' + RBname + ']:checked').val();
For more info, check out:
- Concatenating strings with the + operator
精彩评论