HTML 表单滑块
可能的重复:
表单的最小最大滑块
我目前有一个作为常规 html 表单提交的搜索模块。在其中,我当前获取产品的绝对最小值和最大值,例如 50 和 2500。现在我需要构建一个带有两个按钮的滑块(用于选择范围),并且在提交表单时,这两个用户选择的值需要发送,最好作为两个不同的变量。我不熟悉如何做这样的事情,有什么想法吗?
谢谢你!
编辑:正如每个人都提到 jQuery UI 一样,我实际上一直在摆弄这个,它会很理想,但我无法让它运行..我下载了插件,安装了它并使用 3 行来调用它在我的但是当我在我的html中调用div时它只呈现一个文本框。我错过了什么吗?
Possible Duplicate:
Min Max slider to form
I presently have a search module that submits as a regular html form. In it, I currently fetch an absolute minimum and maximum value for products, for example 50 and 2500. Now I need to build a slider with two buttons (to select a range) and when the form is submitted, both these user-selected values need to be sent, preferrably as two different variables. I am not familiar with how to do such a thing, any ideas?
Thank you!
Edit: As everyone is mentionning jQuery UI, I've been fiddling around with this actually, it woudl be ideal but I haven't been able to make it run..I downloaded the plugin, installed it and used the 3 lines to call it in my but when I call the div in my html it only renders a textbox. Am I missing something?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
检查 jquery UI。它有一个可以很好地工作的滑块元素:
http://jqueryui.com/demos/slider/
Checkout jquery UI. it has a slider element that could work well:
http://jqueryui.com/demos/slider/
您可能需要考虑的一个选项是 JQuery UI Slider: http://jqueryui.com/demos/slider /#范围
One option you may want to consider is the JQuery UI Slider: http://jqueryui.com/demos/slider/#range
HTML 5 实际上会有一个 range input 元素,但现在您可能更喜欢 < a href="http://jqueryui.com/demos/slider/#range" rel="nofollow">jQuery UI slider 并将更改事件附加到一些将提交的隐藏输入字段。
HTML 5 will actually have a range input element, but for now you will probably prefer the jQuery UI slider and attach the change event to some hidden input fields that will be submitted.