ExtJs NumberField或TextField不能处理KeyPress问题

Form控件的
NumberField(或TextField)不能获取键盘事件,可以试试以下方法。

    var barcode = new Ext.form.NumberField({
        allowDecimals: false,
        decimalPrecision: 0,
        allowNegative: false,
        selectOnFocus: true,
        allowBlank: true,
        applyTo: 'txtCard',
        emptyText: '- Scan -'
    });

    Ext.get(barcode.el).on('keyup', function(e) {
    //do something
  }
原文地址:https://www.cnblogs.com/simonhaninmelbourne/p/1566330.html