Get the minimum value allowed for a slider control:
var x = document.getElementById("myRange").min;
Click the button to display the value of the min attribute of the slider control.
<!DOCTYPE html> <html> <body> Points: <input type="range" id="myRange" min="25" max="75"> <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() {//w w w . ja va 2 s.c om var x = document.getElementById("myRange").min; document.getElementById("demo").innerHTML = x; } </script> </body> </html>
The min property sets or gets the value of the min attribute of a slider control.
The min attribute sets the minimum value for a slider control.
The min property accepts and returns a boolean type value.