var Panel = new Ext.form.FormPanel({
            defaults: {
                xtype: 'textfield',
                allowBlank: false,                width: 300
            },
            items: [{                name: 's',
                id: 's',
                fieldLabel: '备注',
                value: s
            }],
            buttons: [{
                text: "确定",
                tabIndex: 1,
                iconCls: 'save',
                handler: onSaveEnvirrecord
            }, {
                text: "取消",
                tabIndex: 2,
                iconCls: 'close',
                handler: function () {
                    win.close();
                }
            }
            ]
        });
 function onSaveEnvirrecord() {
            if (!Panel.form.isValid()) {                onError("字段值不合法,未能保存!");
                return;
            }
            var s = Panel.form.findField('s').getValue();            Ext.Ajax.request({
                url: 'core/WebService.asmx/SaveEnvirrcord',
                headers: {
                    'Content-Type': 'application/json; charset=utf-8'
                },
                method: 'POST',
                jsonData: {
                   s: s
                },
                sucess: function (response) {                    var res = Ext.JSON.decode(response.responseText).d;
                    if (res == "") {                        Ext.MessageBox.show({
                            title: "消息",
                            msg: "保存成功!",
                            buttons: Ext.Msg.OK,
                            icon: Ext.MessageBox.INFO
                        });
                        win.close();
                    }
                    else {
                        onError(res);
                    }
                },
                failure: function (response) { onError(response.responseText); }            });        }
        function onError(error) {
            Ext.MessageBox.show({
                title: '错误',
                msg: error,
                buttons: Ext.Msg.OK,
                icon: Ext.MessageBox.ERROR
            });
        }