【问题标题】:Extjs 3 onchange is not working?Extjs 3 onchange 不工作?
【发布时间】:2023-03-08 12:05:01
【问题描述】:

我在 extjs3 中有一个文本字段,如果我在其中输入 12 位,它应该会自动触发。

我们是通过条码扫描器进行扫描,所以如果数字达到 12 位,它应该会自动触发。

listeners: {
  'change': function(field, newValue, oldValue){
    if(  newValue.length ==12 || newValue.length ==13){
           alert("searchByUpcFunction()");
    }
  }
}

在 extjs 4 中,同样的东西在工作,但在 extjs 3 中没有。我在 extjs 3 中需要同样的东西。

【问题讨论】:

    标签: extjs3


    【解决方案1】:

    收听keyupvalid 事件。 change 在您离开现场时被触发。

    listeners: {
      'keyup': function(field, newValue, oldValue){
         // ...
      }
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-03-23
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多