Javascript Extjs添加到组合框不可选择=";关于;属性
我想在组合框中设置属性Javascript Extjs添加到组合框不可选择=";关于;属性,javascript,jquery,extjs,Javascript,Jquery,Extjs,我想在组合框中设置属性unselectable=“on”。如何在javascript或jquery中设置 Ext.ux.form.HtmlEditor.HR = Ext.extend(Ext.util.Observable, { init:function (cmp) { this.cmp = cmp; // create the combo instance this.combo = new Ext.form.ComboBox({ typeAhead:
unselectable=“on”。
如何在javascript或jquery中设置
Ext.ux.form.HtmlEditor.HR = Ext.extend(Ext.util.Observable, {
init:function (cmp) {
this.cmp = cmp;
// create the combo instance
this.combo = new Ext.form.ComboBox({
typeAhead:true,
enableKeyEvents:false,
triggerAction:'all',
lazyRender:true,
mode:'local',
store:[8, 10, 12, 14, 16, 18, 20, 24, 26, 28, 32, 36, 40, 48, 54, 60, 72],
width:50,
listeners:{
scope:cmp,
select:changeFont
}
});
this.cmp.on('render', this.onRender, this);
},
onRender:function () {
this.cmp.getToolbar().add(this.combo);
}
}))
谢谢。既然您使用的是ExtJS,为什么不直接使用:
Ext.get('someElemName').unselectable();
获取对元素的引用并调用
elem.setAttribute(“unselectable”,“on”)
uncaughttypeerror:Object[Object Object]没有不是对元素引用的方法“setAttribute”