jquery遍历的radio的取值问题
html页面:
<c:if test="${courseStandardVos != null }">
<c:set var="index" value="0"/>
<c:forEach items="${courseStandardVos }" var="courseStandardVo">
<tr>
<td width="10%" align="center" valign="middle">${courseStandardVo.firstName}</td>
<td width="10%" class="border_l" align="center" valign="middle">${courseStandardVo.secondName}</td>
<td width="60%" align="left" valign="middle">${courseStandardVo.thirdName}</td>
<c:set var="index" value="${index+1}"/>
<td width="20%" align="center" valign="middle" name="grade" id="grade">
<input type="radio" id="score_five1" class="radio_ipt" name="radio${index}" value="5"/><label
for="score_five1">5</label>
<input type="radio" id="score_five2" class="radio_ipt" name="radio${index}" value="4"/><label
for="score_five2">4</label>
<input type="radio" id="score_five3" class="radio_ipt" name="radio${index}" value="3"/><label
for="score_five3">3</label>
<input type="radio" id="score_five4" class="radio_ipt" name="radio${index}" value="2"/><label
for="score_five4">2</label>
<input type="radio" id="score_five5" class="radio_ipt" name="radio${index}" value="1"/><label
for="score_five5">1</label>
</td>
</tr>
</c:forEach>
</c:if> jquery代码:
$("#submitGrade").click(function () {
$("#courseStandardVoId tr td").find("input[type='radio']").each(function(){
if($(this).is(":checked")){
alert($(this).val());
}
});
}
jquery遍历的radio的取值问题的更多相关文章
- Jquery操作单选按钮(Radio)的取值赋值实现代码
1.获取选中值,三种方法都可以: $('input:radio:checked').val(); $("input[type='radio']:checked").val(); $ ...
- JQuery select与radio的取值与赋值
radio 取:$("input[name='NAME']:checked").val(); 赋:$("input[name='NAME'][value='指定值']&q ...
- jQuery对html元素的取值与赋值实例详解
jQuery对html元素的取值与赋值实例详解 转载 2015-12-18 作者:欢欢 我要评论 这篇文章主要介绍了jQuery对html元素的取值与赋值,较为详细的分析了jQuery针对常 ...
- 浅谈jquery关于select框的取值和赋值
浅谈jquery关于select框的取值和赋值 jQuery("#select_id").change(function(){}); // 1.为Select添加事件,当选择其 ...
- jquery给div,Span, a ,button, radio 赋值取值
jquery给div的innerHTML赋值 $("#id").html()="test"; //或者 $("#id").html(&quo ...
- jQuery radio的取值与赋值
取值: $("input[name='radioName']:checked").val(); 赋值: $("input[name='radioName'][value= ...
- ZTree 获取选中的项,jQuery radio的取值与赋值
$("input[name='Sex']:checked").val();//取值 $("input[name='radioName'][value=2]"). ...
- jQuery对表单元素的取值和赋值操作代码
使用常规的思路:$(“#keyword”).value 取值是取不到的,因为此时$(‘#keydord’)已经不是个element,而是个jquery对象,所以应该使用:$(“#keyword”).v ...
- jQuery对表单元素的取值和赋值操作代码(转)
使用常规的思路:$("#keyword").value 取值是取不到的,因为此时$('#keydord')已经不是个element,而是个jquery对象,所以应该使用:$(&qu ...
随机推荐
- 原生javascript和jquery实现简单的ajax例子
后台C#代码 public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/p ...
- BLE Hacking:使用Ubertooth one扫描嗅探低功耗蓝牙
0×00 前言 低功耗蓝牙(Low Energy; LE),又视为Bluetooth Smart或蓝牙核心规格4.0版本.其特点具备节能.便于采用,是蓝牙技术专为物联网(Internet of Thi ...
- css3 倒影
说起倒影效果,在传统网页中,我们只能使用photoshop进行事先将倒影设计好,然后导入到网页中,这样不但耗费资源,也阻碍了开发的效率.而 css3新增了Reflections板块,css Refl ...
- 使用Template控制Editor显示方式
@Html.EditorFor可以由Template决定显示 虽然都是EditorFor,页面上显示却不同,ReleaseDate是一个Jquery DatePicker: 怎么实现的呢?就是Temp ...
- ssd硬盘u盘装win7扩展文件时0x80070570错误
搞了个minisata ssd 硬盘,80G正好,只用来装操作系统. 这个u盘装了很多系统了,没感觉会有什么问题,但在安装过程中出现0x80070570错误.见图 网上有很多方法. 最后的解决方法是: ...
- 记一次PHP“Segmentation fault”调试经历
遇到的问题: 在linux上安装php5.5.26.phalcon2.0扩展.xhprof扩展,均正常安装,并可单独运行.但放在一起运行时出现“Segmentation fault”错误.注:xhpr ...
- ARM compiler No such file or directory
/********************************************************************************* * ARM compiler No ...
- url 传参写法
qianee-web/invite/123 @RequestMapping("/invite/{userId}") public ModelAndView invite(HttpS ...
- 修改mysql用户名密码 和 PHPmysqlAdmin对应密码修改
本地的mysql运行时,可能会用到修改用户名密码: mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('输入新密码');不存在修改用户啊 ...
- 20160621-BAPI 更改外向DN&更改拣配
参考代码转自:http://blog.sina.com.cn/s/blog_4c66402b01012lgr.html 感谢. 测试一把,再做总结. 1.更改外向交货单: 2.更改内向交货单. htt ...