Javascript DOM oninput Event handle input range event

Introduction

Range slider, dynamically update slider value.

This example demonstrates how to dynamically update a slider value with oninput.

View in separate window

<!DOCTYPE html>
<html>
<body>
<input type="range" oninput="myFunction(this.value)">
<p id="demo"></p>
<script>
function myFunction(val) {/*from   www . jav a2 s.com*/
  document.getElementById("demo").innerHTML = val;
}
</script>

</body>
</html>



PreviousNext

Related