54
rated 0 times
[
57]
[
3]
/ answers: 1 / hits: 7902
/ 9 Years ago, sun, march 29, 2015, 12:00:00
I have the following form:
<form>
<input type=radio name=group-stack value=grouped checked>grouped<br>
<input type=radio name=group-stack value=stacked>stacked
</form>
I want to get the currently selected radio button's value using d3.
The following attempts have been unsuccessful:
var val = d3.select('input[name=group-stack]').checked; //undefined
var val = d3.select('input[name=group-stack][checked]')[0][0].value //always 'grouped' regardless of which radio is selected
More From » d3.js