extjs学习----官方模版注释1
2011-08-09 14:09
218 查看
EXTJS里面有很多的example,各路高手都建议初学者去看看,学习。于是我就从窗口开始,一个一个看,一个一个做下注释,备忘个。给自己,也给别人。。。
<html> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <head> <title>test page</title> <link rel="stylesheet" type="text/css" href="../resources/css/ext-all.css"/> <script type="text/javascript" src="../adapter/ext/ext-base.js"></script> <script type="text/javascript" src="../ext-all.js"></script> <script type="text/javascript"> Ext.onReady(function(){ var win; var button = Ext.get("btn"); button.on("click",function(){ if(!win){ win = new Ext.Window({ applyTo:'hello-win',//渲染节点 layout:'fit',//布局方式 width:500, height:300, closeAction:'hide',//设置点击右上角关闭按钮时,只是隐藏窗口,而非销毁 plain:true,//根据API上说是和window.body的背景色有关的,可能因为设置问题,个人没发现true和false有什么不同 items://加入子组件 new Ext.TabPanel({ applyTo:'hello-tabs',//选项卡渲染的div id autoTabs:true,//会查询DOM中任何带有"x-tab"样式类的div元素,转化为tab加入到面板中 activeTab:1,//渲染的tab有两个,0表示初始状态第一个活动,1表示第二个活动。 deferredRender:true,//标识tab不是在只有第一次访问的时候才渲染,在上面closeAction注视掉的情况下,这个设为true,则窗口在关闭后第二次将不会被渲染。即不显示。 border:true//显示一套2px宽的内边框 }), buttons:[{ text:'Submit', disabled:true },{ text:'Close', handler:function(){ win.hide(); } }] }); } win.show(button); }); }); </script> </head> <body> <button id="btn">show window</button> <div id="hello-win" class="x-hidden"> <div class="x-window-header">Hello Dialog</div> <div id="hello-tabs"> <div class="x-tab" title="Hello 111"> <p>hello......</p> </div> <div class="x-tab" title="Hello 222"> <p>....world</p> </div> </div> </div> </body> </html>
相关文章推荐
- extjs学习—-官方模版注释2
- extjs学习----官方模版注释1
- extjs学习----官方模版注释3
- extjs学习----官方模版注释2
- extjs学习----官方模版注释3
- extjs学习----官方模版注释2
- Extjs4 学习portal 的官方demo
- extjs学习教程二--怎么理解extjs官方文档
- Extjs学习总结之06页面元素操作和模版
- 读书笔记:机器学习实战(5)——章6的支持向量机代码和个人理解与注释
- 模版的学习
- Sencha touch+Phonegap+IntelliJ 学习散记(一)-介绍、官方下载、配置
- Android官方文档学习01多屏幕适配&Fragment间通信&Intent分享
- Unity官方_第一人称游戏<恶魔射手>----学习笔记一(英雄脚本)
- 【mysql学习系列】Mysql数据库导入官方示例数据库
- openstack 官方安装步骤,学习用.
- 【ExtJS 4.x学习教程】(4)组件(Components)
- android官方文档学习记录
- CPP学习一类模版
- Django2.0官方文档学习-用户权限控制