以下是代码。我想检查加载到input1store的值,我该怎么做?
我尝试了alert(input1store)
,但它只返回了对象,根本没有帮助。
var input1store = new Ext.data.Store({
fields: [{name: 'name'}],
proxy:{
type: 'ajax',
url: 'www.requesturl.com?format=json&source1',
reader: {
type: 'json',
root: 'xml.result'
}
},
autoLoad:false,
sorters: [{property: 'name', direction: 'asc'}]
});
答案 0 :(得分:0)
var records = input1store.getRange();
for(var i = 0, len = records.length; i < len; i++) {
alert(records[i].get('name'));
}