Skip to content
Related Articles

Related Articles

Save Article
Improve Article
Save Article
Like Article

jQuery | :focus Selector

  • Last Updated : 15 Apr, 2019

The :focus Selector is used to select all the elements that have focus on the document currently. It is also used with a tag name or using another selector.




<!DOCTYPE html>
    <script src=
        $(document).ready(function() {
              "background-color", "green");
        <h1 style="color:green;">
        <h2> jQuery :focus Selector 
      </h2> Name:
        <input type="text" />
        <br> Password:
        <input type="text" />


Supported Browsers: The browser supported by jQuery :focus Selector are listed below:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Opera
  • Safari
My Personal Notes arrow_drop_up
Recommended Articles
Page :