//后台数组格式[['小张',28,'男'],['小李',25,'女']]
var _store = new Ext.data.SimpleStore(
url:'http://', //代理的简写
fields:['name','sex','age']
);
_store.load();
_store.on('load',funciton(_store){
alert(_store.getCount());
alert(Ext.util.JSON.encode(_store.getAt(0).data));
});
var _store = new Ext.data.SimpleStore(
url:'http://', //代理的简写
fields:['name','sex','age']
);
_store.load();
_store.on('load',funciton(_store){
alert(_store.getCount());
alert(Ext.util.JSON.encode(_store.getAt(0).data));
});
本文介绍使用ExtJS框架中的SimpleStore组件加载和处理后台数组数据的方法。通过示例代码展示了如何配置SimpleStore来匹配后台数据格式,并监听数据加载完成事件以获取数据总数及首条数据的具体信息。

被折叠的 条评论
为什么被折叠?



