Ext下tree组件节点名无法显示

<script type="text/javascript">
			Ext.onReady(function(){
				var root=new Ext.tree.TreeNode({
					id:"root",
					text:"树的根"	});
				var c1=new Ext.tree.TreeNode({text:"子节点1"});
				var c2=new Ext.tree.AsyncTreeNode({text:"子节点2"});
				root.appendChild(c1);
				root.appendChild(c2);
				var tree=new Ext.tree.TreePanel({
					renderTo:"hello",
					root:root,
					width:300,
					loader:new Ext.tree.TreeLoader({
						applyLoader:false,
						url:"js/treedata.js"})
				});
			});
		</script>


treedata.js:[{id:1, text:"子节点"}]


原因:两文件编码不一致

你可能感兴趣的:(html,ext)