• <nav id="cwumo"><code id="cwumo"></code></nav>
  • <menu id="cwumo"><strong id="cwumo"></strong></menu>

    學習textfield常用的方法

    時間:2020-12-29 19:50:15 學習方法 我要投稿

    學習textfield常用的方法

      一、屬性

    學習textfield常用的方法

      fieldLabel:標簽名稱。

      labelWidth:標簽寬度。

      ID:文件框ID。

      二、構造參數

      listeners:在對象初始化之前,將一系列事件進行綁定。

      三、函數

      getCmp(string _id):得到id為_id的組件對象。

      getValue():得到文件框值。

      四、其它

      layout:只在在此布局下才能正確顯示文件框的'標簽名,布局的宿主對象必面

      是Ext.Container或者Ext.Container的子類。

      在應用FormLayout布局時只要在宿主對象的構造參數中指定layout:"form"即可。

      五、應用舉例

      復制代碼 代碼如下:

      Ext.onReady(function(){

      var _panel = new Ext.Panel({

      renderTo:Ext.getBody(),

      layout:"form",

      labelWidth:30,

      listeners:{

      "render":function(_panel){

      _panel.add(new Ext.form.TextField({

      id:"txt_name",

      fieldLabel:"姓名"

      })) ;

      }

      }}) ;

      new Ext.Button({

      text:"確 定",

      renderTo:Ext.getBody(),

      handler:function(){

      alert(Ext.getCmp("txt_name").getValue()) ;

      }

      }) ;

      }) ;

    【學習textfield常用的方法】相關文章:

    語文常用學習方法08-03

    日語常用口語學習以及方法介紹09-10

    素描學習中常用的三種觀察方法09-30

    語文常用學習方法及技巧有哪些08-03

    學習的方法01-03

    常用的保健按摩方法06-23

    網站推廣常用的方法08-20

    網站推廣的常用方法08-13

    口才訓練的常用方法09-21

    常用的地基處理方法11-11

    日韩激情