This example demonstrates how to dynamically update a slider value with oninput.
<!DOCTYPE html> <html> <body> <input type="range" oninput="myFunction(this.value)"> <p id="demo"></p> <script> function myFunction(val) {/*from w w w .j a v a2s. c o m*/ document.getElementById("demo").innerHTML = val; } </script> </body> </html>