jquery 表单滑块(输入滑块)

发布于 2024-12-22 17:27:06 字数 146 浏览 1 评论 0原文

如何用 jquery 制作滑块,就像这里一样?

sample

用户应从滑块中选择一个值,该值应自动输入

我找不到合适的插件...

How to make slider with jquery, like here?

sample

User should select a value from slider, and this value should automatically be in input

I can not find the appropriate plug-in...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

耶耶耶 2024-12-29 17:27:06

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

 $( "#slider" ).slider({
        value:100,
        min: 0,
        max: 500,
        step: 50,
        slide: function( event, ui ) {
                           //Its setting the slider value to the element with id "amount"
            $( "#amount" ).val( "$" + ui.value );
        }
    });

您可以自定义样式,使其看起来像您提到的示例。

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

 $( "#slider" ).slider({
        value:100,
        min: 0,
        max: 500,
        step: 50,
        slide: function( event, ui ) {
                           //Its setting the slider value to the element with id "amount"
            $( "#amount" ).val( "$" + ui.value );
        }
    });

You can customize the style to look like the example you mentioned.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文