How to scroll a select list with JavaScript or jQuery?

后端 未结 8 1377
傲寒
傲寒 2020-12-03 07:20

I have a select tag:

           
                        
    
提交评论

  • 2020-12-03 08:02

    Or you can just use focus().

    $("select").find("option[value=4]").focus();
    $('select option[value="banana"]').focus();
    
    0 讨论(0)
  • 提交回复
    热议问题