开发者

How to Detect an Event Coming from the Firefox History Dropdown Box

How to detect an event coming from the Firefox history dropdown box?

I need to distinguish between the enter key simply pressed on input field or on item from his native history dropdown box.

The reason is that I would like to call custom submit button (not first one, which is default) on the enter key p开发者_JAVA技巧ressed on any input field. But right now, the enter key pressed on history dropdown box unfortunately call submit as well.


Why not just implement a "submit" event handler and do your special stuff there?


What about using each input's onFocus and onBlur events to dynamically change your submit code as the user shifts focus to and from your controls?

onFocus for any control sets your submit action to be action A.
onBlur for any control sets your submit action to be action B.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜