我想在文本元素上添加事件
$barcodeFieldset = $form->addFieldset('form_barcode', array('legend' => Mage::helper('adminhtml')->__('Barcode Information')));
$barcodeFieldset->addField('barcode', 'submit', array(
'label' => Mage::helper('adminhtml')->__('Barcode'),
'name' => 'barcode',
'onKeyDown' => "alert('x')",
'required' => true,
'note' => 'If You want to scan barcode, focus to this textfield.',
$this->_isReadonly() => $this->_isReadonly(),
));
onKeyDown 不起作用。如何使它起作用?