JQUERY多选框,单选框,检查选中的值
var str=""; $(":checkbox:checked").each(function(){ if($(this).attr("checked")){ str += $(this).val()+"," } })
var cval = ($(":checkbox:checked").val());
var beixuan = document.getElementsByName("goodsExchangeableCon[]").length; var k = 0; for(var i = 0; i < beixuan; i++){ if(document.getElementsByName("goodsExchangeableCon[]")[i].checked == true){ k = k+1; } }