在html的选项标签中包含文本框

时间:2018-11-18 12:06:21

标签: javascript jquery html html-select

我想在我的HTML页面中包含一个下拉菜单,我也打算允许用户输入。这个问题与其他许多在堆栈溢出中要求完全添加一个选项的问题不同。

我在下拉列表中有一个技术指标列表。但是我需要的是,当用户选择“简单移动平均线”时,他/她也许也可以输入SMA周期的期望值。但是据我搜索,似乎没有办法在选项标签中包含文本框。

我可以使用第三方插件,例如bootstrap / select2。有谁知道如何实现这一目标?

1 个答案:

答案 0 :(得分:1)

Adding of textbox inside native dropdown box is not possible. but you can add another textbox. when certain value selected you can display that textbox to get data. I just found out a fiddle according to your requirements.

Fiddle link

相关问题