HTML DOM Input Range autofocus attribute
Examples
See if the slider control to get the focus automatically when the page is loaded:
var x = document.getElementById ( "myRange") autofocus.;
x The output is: true
try it"
Definition and Usage
autofocus attribute is used to set or return the slider control whether to automatically get the focus when the page loads.
This property reflects the HTML autofocus property.
Browser Support
All major browsers support the autofocus attribute
Note: Internet Explorer 9 and earlier versions of IE do not support the use of type = HTML <input> element "range" attribute.
grammar
Back autofocus properties:
rangeObject .autofocus
Setting autofocus properties:
rangeObject .autofocus = true | false
Property Value
value | description |
---|---|
true | false | Describes a slider control to get the focus when the page loads if
|
technical details
return value: | Boolean value that, if the page slider control to get the focus automatically after loading returns true, otherwise returns false. |
---|
Related Pages
HTML Reference Manual: HTML <the INPUT> The autofocus attribute
Input Range Object