extjs树,从后台取到数据,因为有中文,所以先在后编码,到前台解码,但是到前台在哪写解码
extjs树,从后台取到数据,因为有中文,所以先在后编码,到前台解码,但是到前台在哪写解码,因为是用extjs中的treepanel,我的代码是
var left = new Ext.tree.TreePanel({
title:"Navigation",
region:"west",
collapsible:true,
width:200,
autoScroll:true,
//store:treestore,
split:true,
root: new Ext.tree.AsyncTreeNode({
text:'ExtJs',
id:'0',
expanded:true
}),
loader:new Ext.tree.TreeLoader({
dataUrl : 'getMenu.action',
success:function(response,option,success){
var treet = response.responseText;
alert(treet);
}
}),
listeners: {
click: function(node) {
//得到node的text属性
Ext.Msg.alert('消息', '你点击了: "' + node.attributes.text+"'");
}
}
});
在哪写解码的代码啊,我以为在success,但是不是啊,哪位大神知道啊