HTML 5 Slider Bar


/ Published in: JavaScript
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>HTML 5 Slider Bar</title>
  5. </head>
  6. <body>
  7. <input type="range" min="0" max="50" value="0" step="5" onchange="showValue(this.value)" />
  8. <span id="range">0</span>
  9. <script type="text/javascript">
  10. function showValue(newValue)
  11. {
  12. document.getElementById("range").innerHTML=newValue;
  13. }
  14. </script>
  15. </body>
  16. </html>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.