x
 
<!DOCTYPE html>
<html>
<body>
<p>本例演示如何使用 oninput 动态更新滑块值。</p>
<input type="range" oninput="myFunction(this.value)">                             
<p id="demo"></p>
<script>
function myFunction(val) {
  document.getElementById("demo").innerHTML = val; 
}
</script>
</body>
</html>