87,990
社区成员
发帖
与我相关
我的任务
分享items : [{
xtype : 'htmleditor',
id : 'aaa',
name : 'editor',// 加个name 后边有用到
fieldLabel : '内容',
autoHeight : true,
anchor : '98%'
}, {
xtype : 'combo',
name : 'signature',
fieldLabel : '签名',
mode : 'local',
store : 你的store,
displayField : 'signature',
width : 120,
editable : false,
triggerAction : 'all',
listeners : {
'select' : function() {
var val = this.getValue();
// 下面提供两种方法获得htmleditor的内容
var innerVal = document.getElementsByName("editor")[0].value;// 原来的签名
var innerVal = Ext.getDom('editor').value;// 原来的签名
Ext.getDom('editor').value = innerVal.replace(/innerVal/,val); //赋新值
}
}
}]listeners:{
'select':function(){
var val =this.getValue();
var innerVal = document.getElementById('div的id').innerHTML;//原来的签名
document.getElementById('div的id').innerHTML.replace(/innerVal/,val);
}
}