HTML Form Slider [duplicate]

2019-08-09 02:30发布

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?

3条回答
Explosion°爆炸
2楼-- · 2019-08-09 03:06

One option you may want to consider is the JQuery UI Slider: http://jqueryui.com/demos/slider/#range

查看更多
萌系小妹纸
3楼-- · 2019-08-09 03:08

Checkout jquery UI. it has a slider element that could work well: http://jqueryui.com/demos/slider/

查看更多
Evening l夕情丶
4楼-- · 2019-08-09 03:10

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.

查看更多
登录 后发表回答