JavaScript mendeteksi jika elemen aktif dapat ditulis
var tag = false;
if(document.activeElement){
tag = document.activeElement.tagName;
}
if(tag==="INPUT" || tag === "TEXTAREA" || tag==="SELECT" || tag.value){
alert("active element is editable");
}
Friendly Hawk