Ask Your Question
1

Is it possible to have a HTML slider with two inputs?

asked 2023-03-01 11:00:00 +0000

woof gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2022-12-21 06:00:00 +0000

bukephalos gravatar image

Yes, it is possible to have a HTML slider with two inputs using the "range" input type and the "min" and "max" attributes. Here's an example:

<label for="slider">Select a range:</label>
<input type="range" id="slider" name="slider" min="0" max="10" value="5">
<input type="range" id="slider2" name="slider2" min="0" max="10" value="7">

This creates a slider with two handles that can be moved independently to select two different values within the range of 0 to 10. The values chosen can be submitted as form data using the "name" attribute.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-03-01 11:00:00 +0000

Seen: 13 times

Last updated: Dec 21 '22