在IE8中FromPanel 不顯示

自認爲這個登錄例子寫的還行,在FireFox上能正常運行,在IE上什麼竟是空白!我用的是IE8,請看到的人幫助幫助....

這是錯誤信息:
消息: 無效字符
行: 1
字符: 1
代碼: 0


消息: 'events' 爲空或不是對象
行: 14145
字符: 19
代碼: 0


消息: 'events' 爲空或不是對象
行: 14145
字符: 19
代碼: 0



 

<script language="javascript" type="text/javascript" >
            Ext.onReady(function(){
                Ext.QuickTips.init();//開啓表單提示
                Ext.form.Field.prototype.msgTarget = 'side';//設置提示信息位置爲邊上 
                //FormPanel( Object config )
                var myPanel=new Ext.FormPanel({
                    id            : 'myPanel',
                    title        : '我的面板',
                    autoHeight    : true,
                    width         : 280,
            //        autoWidth    : true,
                    autoScroll    : true,
            //        collapsible : true,    //是否隱藏!
                    renderTo     : Ext.getBody(),
                    defaults    : { width : 130 },
                    defaultType :'textfield',
                    items        : [
                        {
                            id             : 'name',
                            fieldLabel     : '用戶名' ,
                            tabIndex     : 1,
                            allowBlank    : false,
                            blankText    : '用戶名不能爲空!',
                            emptyText    : '請輸入用戶名(2-16位)',
                            minLength    : 2,
                            minLengthText    : '用戶名至少2位!',
                            maxLength    : 16,
                            maxLengthText    : '用戶名最多16位!'
                           
                        },
                        {
                            id             : 'pwd',
                            inputType    : 'password',
                            fieldLabel     : '密碼' ,
                            tabIndex     : 2,
                            allowBlank    : false,
                            blankText    : '密碼不能爲空!',
                        //    emptyText    : '請輸入密碼(2-16位)',
                            minLength    : 2,
                            minLengthText    : '密碼至少2位!',
                            maxLength    : 16,
                            maxLengthText    : '密碼最多16位!'
                           
                        },
                       
                    ],
                    buttons : [
                        {                           
                            text     : '登錄',
                            handler    : function(){
                                if(myPanel.form.isValid())
                                    alert("提交");
                                    myPanel.from.submit();    //下面的方法
                            }
                        },
                        {
                            text     : '重置',
                            handler    : function(){
                                myPanel.form.reset();
                            }
                        }
                    ],
                    onSubmit: Ext.emptyFn,
                    submit: function() {
                        alert('驗證是否通過!');                                                   
                     }
                   
                });
            });
    </script> 

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章