Chinaunix
标题:
请教ext jsonstore使用的问题
[打印本页]
作者:
chinaunixzcx
时间:
2011-04-20 09:58
标题:
请教ext jsonstore使用的问题
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,请指教。
作者:
stabilization
时间:
2011-04-20 17:42
是奇怪!
欢迎光临 Chinaunix (http://bbs.chinaunix.net/)
Powered by Discuz! X3.2