Getting input value of a radio button in a group without loop

nhokdown

New Member
I need to obtain which radio button is checked using plain javascript ( No JQuery ) without looping through each input elements and checking for 'checked' attribute for each.PS : Jquery solution would also be appreciated :)Given HTML :\[code\] <tr id = "reportLayout"> <th align="left" style="padding-right: 10px">Layout</th> <td> <input type="radio" name="layout" value="http://stackoverflow.com/questions/13737481/portrait">Portrait</input> <input type="radio" name="layout" value="http://stackoverflow.com/questions/13737481/landscape">Landscape</input> </td> </tr>\[/code\]
 
Back
Top