日期:2014-05-16 浏览次数:20760 次
Ext.onReady(function(){ var root=new Ext.tree.TreeNode({ text:'功能菜单' }); var node1=new Ext.tree.TreeNode({ text:'学生管理', url:'list_student.jsp' }); var node2=new Ext.tree.TreeNode({ text:'班级管理', url:'list_class.jsp' }); root.appendChild(node1); root.appendChild(node2); var menuTree=new Ext.tree.TreePanel({ border:'false', root:root, expanded:true, hrefTarget : 'mainContent', listeners : { click : function(node,e){ mainPanel.load({ url:node.attributes.url, callback : function(){ mainPanel.setTitle(node.text); }, scripts: true }); } } }); new Ext.Viewport({ layout:"border", padding:3, split:"true", frame:"true", items:[ { region:"north", collapsible: "true", title:"学生信息系统", height:"400", html:"<h1><center>学生信息系统主界面</center><h1>" }, { region:"center", contentEl:'main-div', id:'mainContent', width:'80%', title:"信息展示区域", html:"信息展示" }, { region:"west", title:"功能导航", collapsible: "true", items:menuTree, width:'20%' } ] }); var mainPanel=Ext.getCmp("mainContent"); });