第一种方式: textField, 如果知道textField的id = 'textField' 话,就可以利用如下的方法:


    则代码如下:Ext.getCmp("textField").getEl().dom.readOnly = true; 

第二种 方式: textField,如果是 通过 var textField = newExt.form.TextField() 则可以使用下面的方式:


    则代码如下:textField.el.dom.readOnly = true;

 

根据这个原理:可以得出如果组件没有对应的set,get方法时,我们可以通过上述的方法动态的改变组件中某个属性的值;

相关文章:

  • 2021-12-15
  • 2022-12-23
  • 2022-01-24
  • 2021-08-31
  • 2022-12-23
  • 2021-10-11
  • 2021-08-20
猜你喜欢
  • 2021-11-07
  • 2021-12-18
  • 2021-07-19
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案