Flex ~ submit form by return key ~enter key

Action Script
filterForm.addEventListener(KeyboardEvent.KEY_DOWN, function(e:KeyboardEvent):void{
if(e.charCode == 13){
//do something
}
});


MXML
<mx:Form id="filterForm">
</mx:Form>

reference
http://cookbooks.adobe.com/post_Submit_form_with_enter_key-12752.html

沒有留言: