现在的位置: 首页 > 综合 > 正文

textArea异步获取数据换行

2013年09月03日 ⁄ 综合 ⁄ 共 641字 ⁄ 字号 评论关闭

前台:

 

    this.train_result = new Ext.form.TextArea

    ({

        xtype       : 'textarea',

        anchor      : '95%',

        id          : Ext.id(),

        name        : 'train_result',

        grow        : true,

        growMax     : 150,

        growMin     : 50,

        fieldLabel  : '培训收获'

    });

    Ext.Ajax.request

    ({

        url: '../trainComment/get_train_result',

        success: function(response, options)

        {

            var result = Ext.util.JSON.decode(response.responseText);

            this.train_result.setValue(result.train_result);

        },

        failure: function(response, options)

        {

            this.train_result.setValue(0);

        },

        scope : this,

        params: { id : this.uid }

    });

 

后台追加的换行:

result += it.train_other + "//n"

抱歉!评论已关闭.