Home Get the value of a range input slider as a string value
Reply: 0

Get the value of a range input slider as a string value

user547
1#
user547 Published in April 22, 2018, 12:45 am

I have a slider with a label on each end. Is it possible to have the value of the slider to be the text/label?

<label for="good">Good</label>
<label for="bad">Bad</label>
<input id="slider" type="range" class="slider" min="1" max="100"/>

I know it could be done this way:

if(value less than certain amount)
{
   variable = "bad";
}

But this would mean I would have multiple statements of this. Is there an easier way of doing this?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.25401 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO