首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > JavaScript >

EXT-ScriptTagProxy解决跨域json调用

2013-11-18 
EXT--ScriptTagProxy解决跨域json调用// create the Data Storevar store new Ext.data.Store({// load

EXT--ScriptTagProxy解决跨域json调用
// create the Data Store var store = new Ext.data.Store({ // load using script tags for cross domain, if the data in on the same domain as // this page, an HttpProxy would be better proxy: new Ext.data.ScriptTagProxy({ url: 'http://extjs.com/forum/topics-browse-remote.php' }), // create reader that reads the Topic records reader: new Ext.data.JsonReader({ root: 'topics', totalProperty: 'totalCount', id: 'threadid', fields: [ 'title', 'forumtitle', 'forumid', 'author', {name: 'replycount', type: 'int'}, {name: 'lastpost', mapping: 'lastpost', type: 'date', dateFormat: 'timestamp'}, 'lastposter', 'excerpt' ] }), // turn on remote sorting remoteSort: true }); store.setDefaultSort('lastpost', 'desc');

?

热点排行