js 获取checkbox选中的行及相应操作

it2023-02-19  86

function aaa(){         var Check = $("table input[type=checkbox]:checked");//在table中找input下类型为checkbox                        Check.each(function () {//遍历                var value = $(this).parents("tr").find("td").eq(2).find("input").val(); //获取其相对应的value值             var values = $(this).parents("tr").find("td").eq(2).find("input").attr("ID");//获取id             $(this).parents("tr").remove();//删除选中的行             $("#***").css("display", 'none');//通过id设置样式             $("#***").val("");//通过id设置value         }); }

最新回复(0)