Answers for "javascript range slider"

2

javascript get html slider value

var x = document.getElementById("myRange").value
Posted by: Guest on April-02-2020
0

range slider in html

<input type="range" list="tickmarks">

<datalist id="tickmarks">
  <option value="0" label="0%"></option>
  <option value="10"></option>
  <option value="20"></option>
  <option value="30"></option>
  <option value="40"></option>
  <option value="50" label="50%"></option>
  <option value="60"></option>
  <option value="70"></option>
  <option value="80"></option>
  <option value="90"></option>
  <option value="100" label="100%"></option>
</datalist>
Posted by: Guest on May-27-2021
0

how to get range slider value in javascript

// pure javascript
var slider = document.getElementByID('your_slider_id');
console.log(slider.value);

// jQuery
jQuery('#your_slider_id').val();
Posted by: Guest on September-25-2021

Browse Popular Code Answers by Language