I want to fetch all the option values(selected/unselected) in a selectbox on click of a button. How can I do this?
相关问题
- How to fix IE ClearType + jQuery opacity problem i
- jQuery add and remove delay
- Include empty value fields in jQuery .serialize()
- Disable Browser onUnload on certain links?
- how to get selected text from iframe with javascri
in the button click
I think is a good opportunity to use the Traversing/map method:
And if you want to get two separate arrays containing the selected and unselected values you can do something like this:
After that, the
values.selected
andvalues.unselected
arrays will contain the right elements.err ok ..
or maybe you mean