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
  }
posted on 2009-09-14 14:28  Simon Han  阅读(2420)  评论(1编辑  收藏  举报