Vyshnavi Samudrala Vyshnavi Samudrala - 2 months ago 9
HTML Question

Check radio button on button click inside the label

Clicking on label checks the radio button but not on click of a button inside that label

Check the example


<input id="349" type="radio" value="1" name="question1">
<label for="349"><button type="button"> Abe </button></label>
<input id="350" type="radio" value="2" name="question1">
<label for="350">Andrew</label>


You could add an onclick event to the button in question and link it to the input radio tag.

function abe() {

Here is a sample fiddle: http://jsfiddle.net/r2masf5t/