Show Output
<!DOCTYPE html> <html lang="en"> <head> <title>HTML5 Range Input Type</title> <script> function getValue() { var number = document.getElementById("mynumber").value; alert(number); } </script> </head> <body> <form> <label for="mynumber">Select a Number:</label> <input type="range" min="1" max="10" step="0.5" id="mynumber"> <button type="button" onclick="getValue();">Get Value</button> </form> </body> </html>