问题
All!!!
What events should be used when showing or hiding the dropdown list of < option >'s of < select > element?
Actions:
The user press key (Enter for example) or clicked the cursor on an < select > item and was showed dropdown list of < option >'s
The user press key (Esc for example) or select other html element and was hidded dropdown list of < option >'s
item #1 item #1 item #1
$('#myselect').on('event_show_dropdrown_list', function(){}); $('#myselect').on('event_hide_dropdrown_list', function(){});
回答1:
focusin()
and focusout()
jquery methods should do what you are looking for
https://api.jquery.com/focusin/
来源:https://stackoverflow.com/questions/38974201/event-for-show-hide-list-with-options-of-select-element