VOOZH about

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

⇱ HTML DOM Input Search focus() Method - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

HTML DOM Input Search focus() Method

Last Updated : 30 Aug, 2022

The Input Search focus() Method in HTML DOM is used to get focus to the Input search Field when an event occurs.  

Syntax:

searchObject.focus();

Parameter: This method does not contain any parameter value.

Return Value: It does not return any value.

Example: The below example illustrates the use of the Input search focus() method in HTML DOM.

Output:

👁 Image
Input Search focus() Method

Supported Browser:

  • Google Chrome 5 and above
  • Opera 10.6 and above
  • Microsoft Edge 12.0 and above
  • Safari 5 and above
  • Firefox 4 and above
Comment
Article Tags: