Ext.form.FormPanel 独孤九剑-第三式

<!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --> <% @ page contentType = " text/html;charset=UTF-8 " %>
< html >
    
< head >
        
< meta  http-equiv ="Content-Type"  content ="text/html; charset=UTF-8"   />
        
< title > onReady </ title >
        
< link  rel ="stylesheet"  type ="text/css"
            href
="/ext/resources/css/ext-all.css"   />
        
< script  type ="text/javascript"  src ="/ext/adapter/ext/ext-base.js" ></ script >
        
< script  type ="text/javascript"  src ="/ext/ext-all.js" ></ script >
        
< script  type ="text/javascript" >
            
function  myPanel()
            {
                itemsA 
=  [
                         {
                            fieldLabel:
" UserName " , // 文本框标题
                            name: " user " ,
                            id:
" user " ,
                         },
                          {
                            fieldLabel:
" PassWord " ,
                            inputType:
" password " ,
                            name:
" pass " ,
                            id:
" pass " ,
                          }
                        ];
                itemsB 
=  [
                          {
                            xtype:'fieldset',
                            title: '个人信息',
                            collapsible: 
true ,
                            autoHeight:
true ,
                            width:
330 ,
                            defaults: {width: 
150 },
                            defaultType: 'textfield',
                            items :[{
                                    fieldLabel: '爱好',
                                    name: 'hobby',
                                    value: 'www.cnblogs.com'
                                },{
                                    xtype:
" combo " ,
                                    name: 'sex',
                                    store:[
" " , " " , " 保密 " ], // 数据源为一数组
                                    fieldLabel: " 性别 " ,
                                    emptyText:'请选择性别.'
                                }]
                            }
                           ];
                
var  form1  =   new  Ext.form.FormPanel(
                            {
                                   width:
350 ,
                                   frame:
true , // 圆角和浅蓝色背景
                                   renderTo: " form1 " , // 呈现
                                   title: " FormPanel " ,
                                   bodyStyle:
" padding:5px 5px 0 " ,
                                   defaults:{width:
200 ,xtype: " textfield " },
                                   items:itemsB,
                                   buttons:[{text:
" 确定 " },{text: " 取消 " ,handler: function (){alert( " 事件! " );}}]
                                });
             }
             Ext.onReady(myPanel); 
        
</ script >
    
</ head >
    
< body >
        
< div  id ="form1" ></ div >
    
</ body >
</ html >
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值