Javascript examples for DOM HTML Element:Input Range
The min property sets or gets the min attribute of a slider control.
Set the min property with the following Values
Value | Description |
---|---|
number | Sets the minimum value allowed for the slider control |
A String, representing the minimum value allowed
The following code shows how to get the minimum value allowed for a 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() {/*from w ww. j a v a 2 s .com*/ var x = document.getElementById("myRange").min; document.getElementById("demo").innerHTML = x; } </script> </body> </html>