javascriptFind which DOM element has the focus
var focused = document.activeElement;ctrl + cdocument.activeElementreturns currently focused element (docs) |
More of Javascript
- Get query parameter value of specified URL
- Sleep
- Get a timestamp
- Validate email
- Get hostname by url
- Trim a string (remove beginning/ending whitespaces)
- Check if string contains substring
- Use variable as regex
- Get all children and grandchildren of an html element recursively
- How to get element position relative to window
See more codes...