grid 示例中把远程页面返回的数据放在本地html 中为什么显示不出来

jiang2008 2008-10-22
grid 示例中把远程页面返回的数据放在本地html 中为什么显示不出来

ext-2.2\ext-2.2\examples\grid



  var store = new Ext.data.JsonStore({
        root: 'topics',
        totalProperty: 'totalCount',
        idProperty: 'threadid',
       // remoteSort: true,

        fields: [
            'title', 'forumtitle', 'forumid', 'author',
            {name: 'replycount', type: 'int'},
            {name: 'lastpost', mapping: 'lastpost', type: 'date', dateFormat: 'timestamp'},
            'lastposter', 'excerpt'
        ],

        // 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'        })//换成 fk.html 没有任何html标签
    });
    store.setDefaultSort('lastpost', 'desc');

cjshbao 2008-10-24
new Ext.data.ScriptTagProxy是跨域的,你换成new Ext.data.HttpProxy
Global site tag (gtag.js) - Google Analytics