dimanche 1 mars 2015

Why doesn't the range input heed changes in value?

I made a range input element with these min and max values:



<input type='range' min='0' max='9999999' id='mySlider'>


and then tried to change its value to no avail:



// This does not work as intended, at least in Chrome.
// It wrongly moves the slider to the beginning.
slider.value = 5000000;


Moving the slider to the very right side, however, works normally:



slider.value = 9999999;


Why doesn't the first snippet of code for moving the range input work? JsFiddle Demo


Aucun commentaire:

Enregistrer un commentaire