Javascript examples for DOM HTML Element:Input Range
The type property returns which type of form element the slider control is.
A String, representing the type of form element the slider control is
The following code shows how to return which type of form element the slider control is:
<!DOCTYPE html> <html> <body> <input type="range" id="myRange"> <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() {//from w w w .j a v a 2 s .c o m var x = document.getElementById("myRange").type; document.getElementById("demo").innerHTML = x; } </script> </body> </html>