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
- Get selected option text of a dropdown (select) box
- Insert text into textarea at cursor position
- How to stop setInterval execution
- Sleep
- Get a timestamp
- Check if string contains substring
- Trim a string (remove beginning/ending whitespaces)
- Get all children and grandchildren of an html element recursively
- How to check if an object is empty
See more codes...