如何在循环中获取名称不同的radio的值,在后台获取到
<div class="test_content_nr">
<ul>
<li id="#qu_0_${q.id}">
<div class="test_content_nr_tt">
<i>${go.count }</i><span> (10分)</span><font>${q.question }</font><b class="icon iconfont"></b>
</div>
<div class="test_content_nr_main">
<ul>
<li class="option">
<input type="radio" class="radioOrCheck" name="${q.id}"
id="0_answer_1_option_1" value="A"
/>
<label for="0_answer_1_option_1">
A.
<p class="ue" style="display: inline;" >${q.achoose }</p>
</label>
</li>
<li class="option">
<input type="radio" class="radioOrCheck" name="${q.id}"
id="0_answer_1_option_2" value="B"
/>
<label for="0_answer_1_option_2">
B.
<p class="ue" style="display: inline;" >${q.bchoose }</p>
</label>
</li>
<li class="option">
<input type="radio" class="radioOrCheck" name="${q.id}"
id="0_answer_1_option_3" value="C"
/>
<label for="0_answer_1_option_3">
C.
<p class="ue" style="display: inline;" >${q.cchoose }</p>
</label>
</li>
<li class="option">
<input type="radio" class="radioOrCheck" name="${q.id}"
id="0_answer_1_option_4" value="D"
/>
<label for="0_answer_1_option_4">
D.
<p class="ue" style="display: inline;" >${q.dchoose }</p>
</label>
</li>
</ul>
</div>
</li>
</ul>
</div>
</c:forEach>
相关推荐
JavaScript中获取Radio被选中的值
原理就是:一般使用遍历的方法,判断每个Radio是否被选中,如果是,再取其值. <form id=userlist method=post action=option.php> <input type=radio name=userid value=1>1 <input type=radio name=userid value=2>2 <input type=radio name=userid value=3>3 </form> [removed] function usubmit(action){ v
js中获取jsp表单中radio类型的值简单实例
下面小编就为大家带来一篇js中获取jsp表单中radio类型的值简单实例。小编觉得挺不错的,现在就分享给大家,也给大家做个参考。一起跟随小编过来看看吧
JS 如何获取radio选中后的值及不选择取radio的值
以下是网上摘下的文章(未测试但很规范可以模仿) 代码如下: <html> <head> <meta http-equiv=”Content-Type” content=”text/html; charset=gb2312″> <title>text</title> [removed] var chk = 0; [removed]=function (){ var chkObjs = document.getElementsByName(“radio”); for(var i=0;i<chkObjs.length;i++){ if(chkObjs[i].checked){ chk = i
jQuery获取选中单选按钮radio的值
本文给大家分享两段实例代码给大家讲解jquery获取选中单选按钮radio的值,非常不错,具有参考借鉴价值,一起看看吧
vue radio单选框,获取当前项(每一项)的value值操作
主要介绍了vue radio单选框,获取当前项(每一项)的value值操作,具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧


Web 开发
