多种动态选择
我需要一种有多个选择但一次只能看到一个的方法。 当用户想要添加另一个选择时,他/她单击按钮、复选框、单选按钮……等等 他们需要能够添加无限数量的选择。有什么想法吗?
I need a way of having multiple selections but only one visible at a time.
When the user wants to add another selection he/she clicks a button,checkbox,radio..whatever
They need to be able to add an unlimited number of selections. Any Ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
老问题,但不妨加上我的 2 美分,以防其他人想知道答案。
我将使用 JavaScript 在 JavaScript 循环的“更多”部分中创建一个
Which 可以设置您的基本选择元素,并且
New Select Box
将激活此 JavaScript 函数代码:这整个事情可以仅使用这两个代码片段运行,而无需 jQuery需要代码。
Old question, but might as well add my 2 cents, in case anyone else wants to know an answer.
I would use JavaScript to create a
<select>
element in a "more" section, from a JavaScript loop. For example, your first page would haveWhich could setup your basic select element, and the
New Select Box
would activate this JavaScript function code:This whole thing can run with only those two code snippets, and no jQuery code is needed.