如何使
我想做的选项是<选择>通过程序(JS)显示或隐藏,可以吗?
就像StackOverFlow首页中有趣的标签一样,当你输入一些单词时,下拉列表会展开并给你建议。
ps.我知道StackOverFlow在这种情况下没有使用select,无论如何只是作为一个例子。
I want to make the options of < select > show or hide by program(JS),is it possible?
It is just like the interesting tags in the front page of StackOverFlow, when you type in some words, the drop list will expand and give you suggestions.
ps.I know StackOverFlow didn't use select in this case, anyway just take it as an example.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以从
select
的options
集合中添加或删除项目。以下是删除一项并添加另一项的示例:
You add or remove items from the
options
collection of theselect
.Here is an example that removes one item and adds another: