博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2011年11月9日

摘要: 一、树面板简单示例 Javascript代码 vartree=Ext.create('Ext.tree.Panel',{ title:'树面板简单示例', width:150, height:100, renderTo:Ext.getBody(), root:{ text:'树根',//节点名称 expanded:true,//默认展开根节点 children:[{ text:'节点一',//节点名称 leaf:true//true说明为叶子节点 },{ text:'节点二',//节点名称 leaf:true//t 阅读全文

posted @ 2011-11-09 23:30 linFen 阅读(5550) 评论(0) 推荐(0) 编辑

摘要: 一、grid的例: Javascript代码 //配置表格列 {header:"姓名",width:50,dataIndex:'name'}, {header:"组长",width:50,dataIndex:'leader', xtype:'booleancolumn',//Ext.grid.column.Boolean布尔列 trueText:'是', falseText:'否'}, {header:"生日",width:100,dataIndex:&# 阅读全文

posted @ 2011-11-09 23:29 linFen 阅读(4983) 评论(0) 推荐(1) 编辑

摘要: 1、创建Ext.data.Model数据实体模型 Javascript代码 //注册用户数据模型User Ext.regModel('User',{ fields:[//定义模型字段 {name:'name',type:'string'}, {name:'age',type:'int'}, {name:'phone',type:'string'} ] }); //创建User模型的实体对象 varuser=Ext.ModelMgr.create({ name:'tom' 阅读全文

posted @ 2011-11-09 23:27 linFen 阅读(3056) 评论(0) 推荐(0) 编辑

摘要: 1、append方法 Javascript代码 vartpl=newExt.Template(//定义模板 '<tableborder=1cellpadding=0cellspacing=0>', '<tr><tdwidth=90>姓名</td><tdwidth=90>{0}</td></tr>', '<tr><td>年龄</td><td>{1}</td></tr>', '<tr 阅读全文

posted @ 2011-11-09 23:25 linFen 阅读(4972) 评论(1) 推荐(0) 编辑

摘要: 一、addListener方法 Javascript代码 varbutton=Ext.get('btn'); button.addListener('click',hello1);//绑定事件处理函数 button.addListener('click',hello2);var button = Ext.get('btn');button.addListener('click',hello1);//绑定事件处理函数button.addListener('click',hello2);二、ExtJS支 阅读全文

posted @ 2011-11-09 23:22 linFen 阅读(11333) 评论(2) 推荐(0) 编辑

摘要: 1、获取页面上的HTML元素,并进行处理,使用Ext.get('elid')方法,参数为HTML元素的id值,由此可对获取到的元素进行各种处理。例如: Javascript代码 varel=Ext.get("the-id"); varappendEl=Ext.get("the-id-append"); functionfn1(){ Ext.Msg.alert("提示","您在id为'the_id'的Element上按下了ctrl+c键"); } el.addCls("spe 阅读全文

posted @ 2011-11-09 23:20 linFen 阅读(3951) 评论(1) 推荐(0) 编辑

摘要: <HTML><HEAD><TITLE>远程数据源的组合框示例</TITLE><metahttp-equiv="Content-Type"content="text/html;charset=utf-8"><linkrel="stylesheet"type="text/css"href="extjs4/resources/css/ext-all.css"/><scripttype="text/javascrip 阅读全文

posted @ 2011-11-09 23:16 linFen 阅读(2469) 评论(0) 推荐(0) 编辑

摘要: Html代码 <HTML><HEAD><TITLE>提示信息</TITLE><metahttp-equiv="Content-Type"content="text/html;charset=utf-8"><linkrel="stylesheet"type="text/css"href="http://www.cnblogs.com/ext-4.0/resources/css/ext-all.css"/><scriptt 阅读全文

posted @ 2011-11-09 23:15 linFen 阅读(5604) 评论(0) 推荐(1) 编辑

摘要: 一、基础知识 1、JAON对象的例子 Javascript代码 <scripttype="text/javascript"> varperson={//json对象定义开始 name:'tom',//字符串 age:24,//数字 sex:'man', married:false,//布尔值 books:[//数组,在数组中又嵌入了两个json对象 {name:'历史',price:30}, {name:'文学',price:25} ] }//json对象定义结束 //通过点号表示法来取得JSON对 阅读全文

posted @ 2011-11-09 23:12 linFen 阅读(3157) 评论(0) 推荐(1) 编辑

摘要: Ext.create('Ext.panel.Panel',{ title:'面板头部(header)', tbar:['顶端工具栏(toptoolbars)'], bbar:['底端工具栏(bottomtoolbars)'], height:200, collapsible:true, collapseDirection:'left', width:300, frame:true, renderTo:Ext.getBody(), bodyPadding:5, bodyStyle:'background-co 阅读全文

posted @ 2011-11-09 22:22 linFen 阅读(2548) 评论(0) 推荐(0) 编辑