var rows = $(‘#data_list‘).datagrid(‘getSelections‘);//返回所有被选中的行
var CartIDList = new Array();
for(var i=0;i<rows.length;i++)
{
var row = rows[i];
var index = $(‘#data_list‘).datagrid(‘getRowIndex‘, row);//选中行的索引
var dataIn = {};
dataIn.CartID = row["CartID"];
dataIn.Qty = $(‘#cartVal‘ + index).html();
CartIDList.push(dataIn);
}
时间: 2024-10-12 17:43:32