I am looking to create buttons that will increase the value of both the first and second range by 1 when pressed, as well as decrease the value of both ranges by 1 when pressed.
Here is my code:
function run(){
var one = document.getElementById("range1").value;
document.getElementById('out1').value=one;
var two = document.getElementById("range2").value;
document.getElementById('out2').value=two;
}
<input type="range" name="range1" step="1" value="20" min="0" max="100" oninput="run(this.value)" id="range1"/>
<output id="out1">20</output>
<input type="range" name="range2" step="1" value="37" min="0" max="100" oninput="run(this.value)" id="range2"/>
<output id="out2">37</output>
<br>
<button>+</button><button>-</button><br><br><br>
<h2>+ :increment 1 value on both of them</h2>
<h2>- :decrement 1 value on both of them</h2>
and live change