How to access the value of a radio button that is checked using YUI?
问题 i have following radio button structure ... <div id="test"> <input name="test1" value="a" type="radio"> <input name="test1" value="b" type="radio"> <input name="test1" value="c" type="radio"> </div> how would i go about retrieving the value of any checked radio button? i have checked the YUI documentation an there is not really any good example. I would also like to know how to get the element by input name in YUI? 回答1: In YUI 3: var value = Y.one("#test input[name=test1]:checked").get("value