前台:
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"