W3Schools.com
THE WORLD'S LARGEST WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

Input Range focus() Method

Input Range Object Reference Input Range Object

Example

Give focus to a slider control:

document.getElementById("myRange").focus();
Try it yourself »

Definition and Usage

The focus() method is used to give focus to a slider control.

Tip: Use the blur() method to remove focus from a slider control.


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The focus() method is supported in all major browsers.


Syntax

rangeObject.focus()

Parameters

None.

Technical Details

Return Value: No return value

Input Range Object Reference Input Range Object