Javascript Form How to - Create draggable settings bars with range input








Question

We would like to know how to create draggable settings bars with range input.

Answer


<!DOCTYPE html>
<html>
<body>
  <form oninput="x.value=parseInt(a.value)">
    <input type="range" id="a" value="50">
    <output name="x" for="a b"></output>
  </form>
</body>
</html>

The code above is rendered as follows: