javascriptFind which DOM element has the focus
var focused = document.activeElement;
ctrl + c
document.activeElement returns currently focused element (docs) |
More of Javascript
- Get selected option text of a dropdown (select) box
- Get a timestamp
- Round to 1 decimal
- Validate email
- Convert hex to decimal (integer)
- CHeck if DOM element is visible in current viewport
- Get query parameter value of specified URL
- Ajax post x-www-form-urlencoded data
- Insert text into textarea at cursor position
- Access object key by variable
See more codes...