Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript detect if active element is writable

var tag = false;
if(document.activeElement){
	tag = document.activeElement.tagName;
}
if(tag==="INPUT" || tag === "TEXTAREA" || tag==="SELECT" || tag.value){
	alert("active element is editable");
}
 
PREVIOUS NEXT
Tagged: #javascript #detect #active #element #writable
ADD COMMENT
Topic
Name
1+8 =