【问题标题】:How to get values from Extjs template如何从 Extjs 模板中获取值
【发布时间】:2013-09-26 04:46:00
【问题描述】:

我在 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){

      }
        }

    });

【问题讨论】:

  • 已解决...可能对其他人有所帮助

标签: templates extjs textarea


【解决方案1】:

解决了...

下面是解决办法

给模板的textarea一个动态的名字

'<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);

【讨论】:

    猜你喜欢
    • 2011-12-14
    • 2018-09-23
    • 1970-01-01
    • 1970-01-01
    • 2014-07-13
    • 1970-01-01
    • 1970-01-01
    • 2013-07-22
    • 1970-01-01
    相关资源
    最近更新 更多