2

ExtjsGrid 内で Rowexpander を使用しています。RowExpander のテンプレートには、ユーザーから値を取得するために使用されるテキスト領域があります。

以下は私のコードです。値を読み取るにはどうすればよいですか

var expander = new Ext.ux.grid.RowExpander({
        tpl : new Ext.Template(
    '<p><b></b><div class="abc"> <input type="textarea" id = "hans_" name ="hans_" value = "{comment}"</ div></p><p></p><p>{promptMsg}</p>'
                    ),
        listeners:
        {
            expand: function(ex, record, body, rowIndex){

            },
            collapse: function(ex, record, body, rowIndex){

      }
        }

    });
4

1 に答える 1

0

解決しました...

以下は解決策です

テンプレートのテキストエリアに動的な名前を付ける

'<p><b></b><div> <textarea rows="2" cols="100" id = "{qnNum}" name ="{qnNum}" >  {comment} </textarea><b></b></ div></p><p></p>'

値を読む

document.getElementById(record.data.qnNum);
于 2013-09-26T09:21:29.690 に答える