开发者

How to default a select list to have no elements selected for use with jQuery bsmSelect plugin

开发者 https://www.devze.com 2023-03-22 07:11 出处:网络
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 s

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

0

精彩评论

暂无评论...
验证码 换一张
取 消