javascriptFind which DOM element has the focus
var focused = document.activeElement;ctrl + cdocument.activeElementreturns currently focused element (docs) |
More of Javascript
- Round to 1 decimal
- Sleep
- Get all children and grandchildren of an html element recursively
- Get a timestamp
- How to check if an object is empty
- How to stop setInterval execution
- Use variable as regex
- Check if string contains substring
- Insert text into textarea at cursor position
- How to get element position relative to window
See more codes...