I'm using the jQuery bsmSelect plugin to give my users a convenient way to select multiple options from a select-drop-down list. It works well, except I need it to star开发者_运维问答t with nothing selected by default. Anyone know how this can be accomplished?
bsmSelect intro: http://www.ryancramer.com/journal/entries/select_multiple/
HTMLSelectElement.selectedIndex = -1;
The ordinal index of the selected option, starting from 0. The value -1 is returned if no element is selected. If multiple options are selected, the index of the first selected option is returned.
http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-94282980
精彩评论