active element in html code example
Example 1: Javascript find element with focus
var currentElementWithFocus=document.activeElement;
Example 2: button active css
form :active {
color: red;
}
form button:active {
background: black;
}
var currentElementWithFocus=document.activeElement;
form :active {
color: red;
}
form button:active {
background: black;
}