表单中有多条用
我发现,我一点提交他所有都会提交。但是复选框只有选中的为 on ,没有选中的就没有
提交事件里面把没有选中的行的name去掉
谢谢提醒!!!!解决了
这是方法代码
$("#jiesuan").click(function(){ alert("结算"); //复选框的name='od' $("input[name='od']").each(function(){ if($(this).attr("checked")== 'checked'){ //是选中 }else{ // td tr $(this).parent().parent().find("input").removeAttr("name"); } }); });
HTML怎么学习?HTML怎么入门?HTML在哪学?HTML怎么学才快?不用担心,这里为大家提供了HTML速学教程(入门课程),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号