最小最大滑块形成 [英] Min Max slider to form

查看:105
本文介绍了最小最大滑块形成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前有一个搜索模块,它以常规html形式提交.目前,我在其中获取产品的绝对最小值和最大值,例如50和2500. 现在,我需要构建一个带有两个按钮的滑块(以选择一个范围),并且在提交表单时,这两个用户选择的值都需要发送,最好是作为两个不同的变量发送.我不熟悉如何做这样的事情,有什么想法吗?

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?

谢谢!

http://jqueryui.com/demos/slider/

这种格式非常理想,但是我什至无法实现滑块,更不用说发送2个值了. 如果有人可以帮助实现上述滑块,或者建议其他滑块方法,那将非常有帮助.

This format would be ideal, however I was not able to even implement the slider, let alone send 2 values with it. If someone can help with implementation of the above slider, or suggest a different slider method it would be very helpful.

推荐答案

为什么无法实现jQuery UI滑块?这是我包括jQueryUI插件的步骤.

Why weren't you able to implement the jQuery UI slider? Here are the steps I take to including jQueryUI plugins.

  1. 链接到jQuery
  2. 链接到jQueryUI
  3. 链接jQueryUI样式表
  4. 创建HTML

div id ="slider">

div id="slider">

5.创建JS

$(function(){  
     $('#slider').slider({  
          min: 50,  
          max: 2500
     });     
});  

http://jsfiddle.net/aHFwP/

这篇关于最小最大滑块形成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆