javascript 输入具有开始值和结束值的双范围值

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/20142509/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-27 17:51:01  来源:igfitidea点击:

Input a double range of values with start and end values

javascriptphphtmlinputrange

提问by Emilie

I have to select some values in a range, with a start and an end value, like in this image example : enter image description here

我必须在一个范围内选择一些值,带有开始值和结束值,就像在这个图像示例中一样: 在此处输入图片说明

I search with <input type="range">HTML element, but it can't have two selectors.

我用<input type="range">HTML 元素搜索,但它不能有两个选择器。

I can use JavaScript(even a library if a natural way doesn't exist) or PHP, and of course HTMLand CSS. I didn't find anything like that, so you are my last hope.

我可以使用JavaScript(如果不存在自然方式,甚至可以使用库)或PHP,当然还有HTMLCSS。我没有找到那样的东西,所以你是我最后的希望。

Do you know something ?

你知道吗?

P.S.: I know I could use two basics inputs, but it is a client wish to have a graphical unique input like that.

PS:我知道我可以使用两个基本输入,但客户希望拥有这样的图形唯一输入。

采纳答案by andrei

A jquery double range slider for example http://jqueryui.com/resources/demos/slider/range.html

一个 jquery 双范围滑块,例如http://jqueryui.com/resources/demos/slider/range.html

On http://plugins.jquery.com/you can find lots of jquery plugins. If you look for range slider you will have more than one results.

http://plugins.jquery.com/ 上,您可以找到很多 jquery 插件。如果您寻找范围滑块,您将获得多个结果。

回答by DavidTaubmann

NO jQuery solution

没有 jQuery 解决方案

If you are not working with jQuery (like us) you would love this solution: https://refreshless.com/nouislider

如果您不使用 jQuery(像我们一样),您会喜欢这个解决方案:https: //refreshless.com/nouislider

Nice day

美好的一天