JavaScript » Password » focus

Syntax:
object.focus()

This method is used to give focus to an object. It can be used to focus on a Password object prior to a value being entered, either by the user in the password field, or by JavaScript code programatically.