dcsimg
www.webdeveloper.com
Results 1 to 4 of 4

Thread: Which item has focus?

  1. #1
    Join Date
    Nov 2002
    Location
    Flint, Michigan, USA
    Posts
    623

    Which item has focus?

    Within a JavaScript function, I want to find out which HTML object currently has focus. I've searched, but....

  2. #2
    Join Date
    Mar 2005
    Location
    Behind you...
    Posts
    1,159
    Have you tried document.activeElement?

  3. #3
    Join Date
    Nov 2002
    Location
    Flint, Michigan, USA
    Posts
    623
    Thank you. That appears to be exactly what I need.

    I should thank you for this and mark this question solved, but I don't see those options in this forum.

  4. #4
    Join Date
    Nov 2002
    Location
    Flint, Michigan, USA
    Posts
    623
    I just tried it and it works perfectly! Thank you.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles