Can I open a selectbox with JavaScript? [duplicate]
Possible Duplicate:
Show select dropdown in jQuery?
Is it possible to open a selectbox with JavaScript? Or with jQuery?
In short: no, it's not possible. Long answer, see How do you open a select box with JavaScript?.
If you want to "open" a selectbox, this is impossible - see Stack Overflow question Click trigger on select box doesn't work in jQuery for more information.
If you want to select a value, you should use .val()
.
Duplicate: Show select dropdown in jQuery?
Can't be done, you can use .trigger('focus')
but it will not open the drop down.
精彩评论