有没有使用Select2显示为文本框而不是选择工具外观?
最佳答案
根据文档:
Select2 also supports multi-value select boxes. The select below is declared with the multiple attribute. Select2 automatically picks up on this:
<select multiple>...</select>
这就是“文本框”的外观。
或者,如果您只进行了一次选择,则可以更改现有选择工具的 CSS 样式,使其“看起来”像标准文本框。
关于javascript - 如何使用select2显示为文本框?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28933869/