We need a special user control for our web application.
It should ideally look and work exactly like typical <select>
element but with additional feature that would allow user to select multiple choices.
I imagine it like drop-down list of items with checkboxes. User can either select one and only item by clicking it (just like normal selectbox) or click checkboxes, thus selecting more options.
Something quite similar are Move to and Labels buttons in Gmail interface.
Can you recommend such product? Should we devel开发者_如何学Pythonop our own solution? Can you recommend resources or how to start?
The easiest way is to add the multiple
attribute to your select
tag e.g.:
<select multiple name="myselect">
<option value="1">1</option>
<option value="2">2</option>
</select>
I think this J-Query based solution (jQuery Dropdown Check List by Adrian Tosca) is a little bit more robust.
HTML's <select>
element already provides this:
multiple [CI]
If set, this boolean attribute allows multiple selections. If not set, the SELECT element only permits single selections.
精彩评论