sencha touch之表单(login demo)
来源:互联网 发布:找网络推手 编辑:程序博客网 时间:2024/04/29 03:59
现在来说说sencha touch中的表单,举个简单的login的例子,相关的说明我都放在了注释中,看下面代码
Ext.application({id:'itKingApp',launch:function(){var formPanel=Ext.create('Ext.form.Panel',{id:'formPanel1',// 表示是否可以滑动,vertical=上下滑动 horizontal=左右滑动 both=上下左右都可以 flase=不滑动scrollable:'vertical',width:'700px',height:'400px',centered:true,style:{'padding':'1px'},items:[{xtype:'fieldset',title:'用户信息',instructions:'请填写用户信息',width:'640px',height:'180px',defaults:{// 主要设置了textfield的label长度,这里固定了150px,也可以设置百分比labelWidth:'150px'},items:[{xtype:'textfield',id:'txt_name',namle:'name',label:'用户名',placeHolder:'请输入用户名',// required=true label旁边有个* false则没有required:true,// 输入框中右侧的X按钮clearIcon:true,// 显示的label位置,有上下左右四种,默认是left(top, bottom,right)labelAlign:'left'},{xtype:'passwordfield',id:'txt_password',name:'password',label:'密码',placeHolder:'请输入密码',required:true,clearIcon:true}]},{xtype:'container',layout:{type:'vbox'},items:[{xtype:'button',text:'注册',width:'600px',style:{'margin-left':'30px'}},{xtype:'button',text:'登陆',width:'600px',style:{'margin-left':'30px','margin-top':'10px'}}]}]});Ext.Viewport.add(formPanel);}})
下面是效果图
以上代码都可以转载,但请说明下出处,多谢合作,http://blog.csdn.net/jjx0224/article/category/1650487
- sencha touch之表单(login demo)
- sencha touch之表单二(注册页面)
- sencha touch自定义表单验证
- sencha touch自定义表单验证
- sencha touch之布局
- sencha touch之carousel
- sencha touch之NavigationView
- Sencha Touch 之 Ajax
- 在Sencha Touch 2中使用表单
- Sencha Touch学习笔记(九)表单
- 开启Sencha Touch 之旅
- sencha touch学习心得之FormPanel
- Sencha Touch之Hello World
- sencha touch学习心得之FormPanel
- Sencha Touch 之 layout(布局)
- Sencha Touch 之 Listeners(监听器)
- Sencha Touch 之 环境探测
- sencha touch学习心得之FormPanel
- 高级IO复用应用:聊天室程序
- 正文内容 mysql数据库添加添加事务处理为mysql数据库添加添加事务处理的方法-
- Ubuntu下android adb 连接
- [LeetCode]Longest Palindromic Substring
- 企业进行网站建设的意义所在
- sencha touch之表单(login demo)
- size_type、size_t、different_type以及ptrdiff_t
- Windows 用来定位 DLL 的搜索路径
- 程序上班干的事
- hibernate部分更新失效的问题
- Axure多人协作
- jsp中将后台传递过来的json格式的list数据,绑定到下拉菜单
- virsh管理工具
- 缓存