gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-03 00:43:06 25 4
gpt4 key购买 nike

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

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

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

最佳答案

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

关于javascript - 在 html 中的选项标签中包含文本框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53360678/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com