简体   繁体   中英

select option in html select using keys javascript

I have used jqtransform to change the default look of form select. Now i couldn't select an option using arrow keys. I need to select options using keys . How to do that?

Here is my html

<form>
<select name="test">
<option value="" selected="selected">option 1</option>
<option value="01">option 2</option>
<option value="02">option 3</option>
</select>
</form>

Here is my internal script

$(function(){
    $('form').jqTransform({imgPath:'images/'});
});

Well I think that Plugins disables keyboard navigation. you can confirm here: http://j.mp/VlZNSd in the left side bar you can try it yourself. It does not work. If your interest is to keep that design change plugin to a better one like: http://j.mp/VySpJ2 you will keep the design and it will work with keyboard. I don't have the solution to your problem this is a work around.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM