请问各位大佬 fieldset 怎么获取其中选中的值?
<div class="star-rating">
<fieldset id="test">
<input type="radio" id="star5" name="rating" value="5" /><label for="star5" title="Outstanding" value="5">5 stars</label>
<input type="radio" id="star4" name="rating" value="4" /><label for="star4" title="Very Good" value="4">4 stars</label>
<input type="radio" id="star3" name="rating" value="3" /><label for="star3" title="Good" value="3">3 stars</label>
<input type="radio" id="star2" name="rating" value="2" /><label for="star2" title="Poor" value="2">2 stars</label>
<input type="radio" id="star1" name="rating" value="1" /><label for="star1" title="Very Poor" value="1">1 star</label>
</fieldset>
</div>
请问一下怎么获取选中的值?
<fieldset id="test">
<input type="radio" id="star5" name="rating" value="5" /><label for="star5" title="Outstanding" value="5">5 stars</label>
<input type="radio" id="star4" name="rating" value="4" /><label for="star4" title="Very Good" value="4">4 stars</label>
<input type="radio" id="star3" name="rating" value="3" /><label for="star3" title="Good" value="3">3 stars</label>
<input type="radio" id="star2" name="rating" value="2" /><label for="star2" title="Poor" value="2">2 stars</label>
<input type="radio" id="star1" name="rating" value="1" /><label for="star1" title="Very Poor" value="1">1 star</label>
</fieldset>
</div>
请问一下怎么获取选中的值?
...全文
相关推荐
C#获取radioButton之间选中的值(超简单)
两个radioButton选中其中一个弹出选中的值对话框,也可用在数据库如(男或女)
jQuery 获取select选中值及清除选中状态
主要介绍了jQuery 获取select选中值及清除选中状态的相关资料,非常不错,具有参考借鉴价值,需要的朋友可以参考下
jQuery获取checkbox选中的值
jquery checkbox选择器在程序开发中经常会用到,接下来通过实例代码给大家介绍jquery获取checkbox选中的值,需要的朋友参考下
js获取select标签选中值的两种方式
代码如下: var obj = document.getElementByIdx_x(”testSelect”); //定位idvar index = obj.selectedIndex; // 选中索引var text = obj.options[index].text; // 选中文本var value = obj.options[index].value; // 选中值jQuery中获得选中select值第一种方式$(‘#testSelect option:selected’).text();//选中的文本$(‘#testSelect option:selected’) .val();/
C#中获取CheckBox选中值(多选)
代码中简单易懂的获取所选中的CheckBox的值


