EXT.JS 弹窗

  • Post author:
  • Post category:其他


var win = Ext.create("Ext.window.Window", {
			    id: "myWin",
			    title: "示例窗口",
			    width: 500,
			    height: 300,
			    layout: "fit",
			    maximizable :true, // 显示bai最大化按钮在右上角
			    items: [
			        {
			            xtype: "form",
			            defaultType: 'textfield',
			            defaults: {
			                anchor: '100%',
			            },
			            fieldDefaults: {
			                labelWidth: 80,
			                labelAlign: "left",
			                flex: 1,
			                margin: 5
			            },
			            items: [
			                {
			                    xtype: "container",
			                    layout: "hbox",
			                    items: [
			                        { xtype: "textfield", name: "name", fieldLabel: "姓名", allowBlank: false },
			                        { xtype: "numberfield", name: "age", fieldLabel: "年龄", decimalPrecision: 0, vtype: "age" }
			                    ]
			                }
			            ]
			        }
			    ],
			    buttons: [
			        { xtype: "button", text: "确定", handler: function () { this.up("window").close(); } },
			        { xtype: "button", text: "取消du", handler: function () { this.up("window").close(); } }
			    ]
			});



版权声明:本文为tyt1002原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。