Javascript examples for DOM HTML Element:Input Range
The Input Range object represents an HTML <input> element with type="range".
You can access an <input> element with type="range" by using getElementById():
<!DOCTYPE html> <html> <body> <input type="range" id="myRange" value="90"> <button onclick="myFunction()">get the value of the slider control</button> <p id="demo"></p> <script> function myFunction() {/* w ww .j av a 2 s . c om*/ var x = document.getElementById("myRange").value; document.getElementById("demo").innerHTML = x; } </script> </body> </html>