KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm working on some JavaScript that requires a tag that can get focus. I'd like to be able to use a <div /> tag, however <div /> tags can't get focus. It looks like the only elements that can gain focus are <input /> tags and <a /> tags. Is there any other way to allow an element to gain focus that isn't an <input /> or <a /> tag? I can't use <a /> or <input /> tags because I need to be able to place content inside of the tag so neither of those tags will work, unless there's a way to allow nested <a /> tags, although I doubt it since that goes against the standard . I'm trying to figure out a way to allow a <div /> tag (or any other container element) to get focus.
Tags (comma-separated)
Save Edits
Cancel