HTML Form Slider [duplicate]

假如想象 提交于 2019-12-11 06:22:51

问题


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?


回答1:


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




回答2:


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




回答3:


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.



来源:https://stackoverflow.com/questions/7406717/html-form-slider

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!