I have a select tag as shown below:
<select id="fruits"> <option value="1">Apple</option> <option value="2">Banana</option> <option value="3">Orange</option> <option value="4">Grapes</option> <option value="5">Ginger</option> </select>
I want that whenever the user focuses on select , and by pressing the " G " key on his keyboard, the " Grapes " option will be automatically selected, and when he press " G " again, " Ginger " will be selected and so on.
I do not know how to do that.
source share