Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

How do I find out which DOM element has the focus in jQuery?

I have two buttons in my HTML. On click of one, I want to find out which selector it serves. On clicking another, it should display which element is used. How can I achive this using jQuery?

The selector I want to show is :focus.
The element I want to show is button.


0 Answer
Advertisements

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.