同样的一段代码和同样的浏览器,不同的机子为什么显示出来的效果就是不一样勒。在ie下可以,在火狐下显示ok但不触发任何事件,比如单击事件。郁闷我两天噢!     <script type="text/javascript">
Ext.onReady(function() { 
    // 开启表单提示 
    Ext.QuickTips.init(); 
    // 设置提示信息位置为边上 
    Ext.form.Field.prototype.msgTarget = 'side'; 
    var win = new Ext.Window({ 
        id : 'login-win', 
        title : '登陆', 
        iconCls : 'tabs', 
        width : 300, 
        height : 120, 
        collapsible : true, 
        plain : true, 
        // 初始化表单面板 
        items : new Ext.form.FormPanel({ 
            id : 'login-form', 
            labelWidth : 50, // 默认标签宽度板 
            labelAlign : 'right', 
            buttonAlign : 'center', 
            // 不设置该值,表单将保持原样,设置后表单与窗体完全融合 
            baseCls : 'header', 
            layout : 'form', 
            defaults : { 
                width : 200 
            }, 
            // 默认字段类型 
            defaultType : 'textfield', 
            items : [{ 
                id : 'username', 
                fieldLabel : '账号', 
                allowBlank : false 
                    // 禁止为空 
                    }, { 
                        id : 'password', 
                        inputType : 'password', 
                        fieldLabel : '密码', 
                        allowBlank : false 
                    }], 
            // 初始化按钮 
            buttons : [{ 
                text : '登陆', 
                type : 'submit', 
                handler : function() { 
                    var but = this; 
                    but.setDisabled(true); 
                    this.setText('正在登陆'); 
                    // 将表单提交 
                    Ext.getCmp('login-form').getForm().submit({ 
                        url : '/XXX/login.action', 
                        method : "POST", 
                        success : function(form, action) { 
                            document.location = '/XXX/main.jsp'; 
                        }, 
                        failure : function() { 
                            but.setText("登陆"); 
                            but.setDisabled(false); 
                        } 
                    }); 
                } 
            }] 
        }) 
    }); 
    // 将窗口显示出来 
    win.show(); 
}); 
    </script>