[jQuery] gettng value from radio buttons
Hi,
I have two radio buttons, when user click I'd like to know what is
value selected now inside updateoptns, but the code below always
return '0',
any idea how to do this? Thanks,
Angelo
<label for="optns"> </label>
<input checked="checked" class="rb_optns" id="rd1" name="optns"
onClick="updateoptns()" type="radio" value="0" /> </label>
<input id="rd2" name="optns" onClick="updateoptns()" type="radio"
value="1" /> Metric (kg/cm)</label>
<br clear="none" />
function updateoptns() {
var optns = jQuery("input[@name='optns']");
alert(optns.val());
}