VOOZH about

URL: https://www.geeksforgeeks.org/html/html-dom-input-url-focus-method/

⇱ HTML DOM Input URL focus() Method - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

HTML DOM Input URL focus() Method

Last Updated : 13 Feb, 2022

The Input URL focus() method in HTML DOM is used to get focus to the Input URL field when the event occurs. We can use this method for directing the focus of the user when an event occurs.

Syntax:

URLObject.focus()

Parameters: This method does not contain any parameter values.

Return Value: It does not return any value.

Example: Below program illustrates the use of the input URL focus() method in HTML DOM. 

Output:

👁 Image

Supported Browsers:

  • Google Chrome
  • Mozilla Firefox
  • Internet Explorer
  • Opera
  • Safari
Comment
Article Tags: