private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e){ for (int i = 0; i < dataGridView1.Rows.Count; i++) { if ((bool)dataGridView1.Rows[i].Cells[0].EditedFormattedValue==true) //之前用value,值一直不变,改为EditedFormattedValue
一种是通过jquery A. $("[name='selectUserId']:checked").each(function () { // $(this).attr("value") 被选中的checkbox的value属性(就是adminuser的id) array.push($(this).val());//把所有被选中的id放入数组array }); B. var checkUserName = $("#checkUserName").