function jqchk(){ //jquery获取复选框值 var s=''; $('input[name="aihao"]:checked').each(function(){ s+=$(this).val()+','; }); 点击“提交”后,可以得到正确的选择值了,但是后面多一个,(英文逗号),这个可以检测一下再用substring去除,或者获取到复选框选择值后一般都要转成数组再使用的,所以也可以在转成数组后,去除最后一个数组元素. if (s.len
var bookVersionId = []; var examVirtualSetResultId; $.each($('input[type=checkbox]:checked'),function(i,itesm){ examVirtualSetResultId = $(itesm).attr('data-type'); var examResultIds = $(itesm).attr('data-typeid'); var userCode = $(itesm).attr('data-
方法一:DataRowView mySelectedElement = (DataRowView)dataGrid1.SelectedItem; string result = mySelectedElement.Row[0]ToString(); 方法二:var a = this.dataGrid1.SelectedItem; var b = a as DataRowView;string result = b.Row[0].ToString();
方法一: DataRowView mySelectedElement = (DataRowView)dataGrid1.SelectedItem; ]ToString(); 方法二: var a = this.dataGrid1.SelectedItem; var b = a as DataRowView; ].ToString();