HTML5 input Slider with onchange function - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Input Slide

Description

HTML5 input Slider with onchange function

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript">

      </script> 
   </head> 
   <body> 
      <script>
    function updateSlider(slideAmount) {
        var sliderDiv = document.getElementById("sliderAmount");
        sliderDiv.innerHTML = slideAmount;
    }/* w w w.  j  a v a 2s  .  c  o m*/

      </script> 
      <input id="slide" type="range" min="1" max="100" step="1" value="10" onchange="updateSlider(this.value)"> 
      <div id="sliderAmount"></div>  
   </body>
</html>

Related Tutorials