+ -
当前位置:首页 → 问答吧 → 请教ext jsonstore使用的问题

请教ext jsonstore使用的问题

时间:2011-04-20

来源:互联网

js代码如下:

treeStore=new Ext.data.JsonStore({
                        url:'left_tree.php',
                        root:'props',
                        fields:['id','icon','node_name']
                });
                treeStore.load();
                console.info('treeStore_count=' + treeStore.getCount());


left_tree.php的代码如下:
{props:[
<?php
$a["id"]=  "123";
$a["icon"] = "1";
$a["node_name"]=  "zcx";
echo json_encode($a);
?>
]}


代码执行后发现输出是treeStore_count=0
理论上应该是1才对,不知道为什么是0,请指教。

作者: chinaunixzcx   发布时间: 2011-04-20

是奇怪!

作者: stabilization   发布时间: 2011-04-20

热门下载

更多