[ExtJS] 關於取得欄位的值

看板Ajax作者時間16年前 (2009/09/19 23:25), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/2 (看更多)
小弟我搞了兩天,還是搞不到要怎麼處理 沒有JS的基礎,所以一些東西沒概念 大致上是拿ExtJS的sample來改 想要研究出按鈕動作,大致上需要定義按鈕的handler 我想要寫一個簡單功能測試 就是按了按鈕之後,會把特定欄位輸入的值 顯示在訊息視窗上(alert();) 請問我應該怎麼寫才對 例如下面程式 有一個argument i的欄位,名稱是arg_i 我想要按submit鈕之後,跳出視窗顯示arg_i輸入的值 var rowLayout = { id: 'row-panel', bodyStyle: 'padding:5px', layout: 'ux.row', title: 'Row Layout', items: [{ title: 'Usage', rowHeight: 0.35, },{ title: 'Examples', xtype: 'form', defaultType: 'textfield', rowHeight: 0.4, items:[{ fieldLabel: 'argument i', name: 'arg_i', allowBlank:true}], buttons:[{ text:'Submit', handler: function(){ alert();//出現視窗顯示輸入的值 } }] },{ title: 'Result', rowHeight: 0.25, autoScroll: true }] }; 謝謝!! -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.129.162.64
文章代碼(AID): #1AjFW3qK (Ajax)
討論串 (同標題文章)
文章代碼(AID): #1AjFW3qK (Ajax)