大小为 1 的多选下拉菜单
有什么方法可以创建大小为 1 的组合框 (
Is there any way of creating a combo box (<select>
) with a size of 1? All the examples I can find allow for multiple selects but with a number of options visible at any one time. If this cannot be accomplished with bog standard HTML is it possible in a JS library such as JQuery?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
编辑:我的帖子没有回答问题,但评论可能会澄清问题。
您想要的是将属性
size
设置为 1,即:EDIT: My post does not answer the question, but the comments might clarify the question.
What you want is to set the attribute
size
to 1, i.e.:我担心这将是可用性的噩梦。您想要实现的更总体目标是什么?我确信已经存在更好的解决方案。
我猜你需要类似标签编辑器小部件之类的东西。
I'm afraid that would be usability nightmare. What is the more general goal you are trying to achieve? I'm sure better solutions already exist.
I could guess you need something like tag editor widget.