var rows = $('#table').datagrid('getSelections');
for(var i=rows.length-1;i>=0;i--){
var url="toOrderUpdate.do?orderId=" + rows[i].id + "&oldState=" + rows[i].orderState;
}
能這樣傳嗎
這樣傳到action中怎麼接收呀
id,state組合成一個參數,然後每個id,state用逗號分開,傳遞總的數據,服務器端獲取參數後分割下
var rows = $('#table').datagrid('getSelections');
var ids='',state='';
for(var i=rows.length-1;i>=0;i--){
ids+=','+rows[i].id ;
state+=','+rows[i].orderState;
}
ids=ids.substring(1);
state=state.substring(1)
var url="toOrderUpdate.do?orderId=" + ids+ "&oldState=" + state;////