日期:2014-05-16 浏览次数:20405 次
var lstAddRecord=new Array();
store.each(function(record) {
lstAddRecord.push(record.data);
});
Ext.Ajax.request({
url: 'function/rivaldata/rivalDataAction.do?tag=add',
params: {strJson:Ext.encode(lstAddRecord)}
}); String strJson=request.getParameter("strJson");
JSONArray js=JSONArray.fromObject(strJson);
JSONObject jo=null;
Iterator it=js.iterator();
while(it.hasNext()){
jo=(JSONObject)it.next();
//follow codes are get the value :)
String goodId=jo.getString("goodId");
Double goodsPrice=jo.getDouble("goodsPrice");
//ok, to do something use the vaules:)
System.out.println("the goodId is :"+goodId);
}