我开始使用Sencha Touch编写代码,我想做与下面相同的事情,但距离:
MyApp.search = new Ext.data.TreeStore({
model: 'ListItemSearch',
proxy: {
type: 'ajax',
url: 'search.json',
reader: {
type: 'tree',
root: 'items'
}
}
});它工作得很好,但我想让它与JSONP保持距离,如下所示:
MyApp.search = new Ext.data.TreeStore({
model: 'ListItemSearch',
proxy: {
type: 'ajax',
url: 'http://www.test.com/search.json',
reader: {
type: 'tree',
root: 'items'
}
}
});我不知道如何编写代码,我尝试的示例也不起作用。
我该怎么做呢?
https://stackoverflow.com/questions/7560037
复制相似问题