jquery获取所有选中的checkbox的ID
//获取所有选中的CheckBox的id function getCheckBox() { var spCodesTemp = ""; $("input:checkbox[name=IsOnSell]:checked'").each(function(i) { if (0 == i) { spCodesTemp = $(this).attr("id"); } else { spCodesTemp += ("," + $(this).attr("id")); } }); alert(spCodesTemp); }
posted on 2013-11-28 15:18 alonelonly 阅读(1851) 评论(0) 收藏 举报
浙公网安备 33010602011771号