Name
HTMLInputElement.focus( ) — give keyboard focus to this element
Availability
DOM Level 1 HTML
Synopsis
void focus( );
Description
This method transfers keyboard focus to this element so the user can interact with it without first clicking on it.
Get JavaScript: The Definitive Guide, Fourth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.