The type
property get type string of the slider control.
type |
Yes | Yes | Yes | Yes | Yes |
var v = rangeObject.type
A String type value representing the type of the slider control.
The following code shows how to get the type string of the slider control.
<!DOCTYPE html>
<html>
<body>
<!--from www . ja v a 2s . co m-->
<input type="range" id="myRange">
<button onclick="myFunction()">test</button>
<p id="demo"></p>
<script>
function myFunction() {
var x = document.getElementById("myRange").type;
document.getElementById("demo").innerHTML = x;
}
</script>
</body>
</html>
The code above is rendered as follows: