Answers for "how to detect if someone pressed escape form html"

5

javascript detect escape key

document.addEventListener('keydown', function(event){
	if(event.key === "Escape"){
		//do something
	}
});
Posted by: Guest on November-12-2019

Code answers related to "how to detect if someone pressed escape form html"

Code answers related to "Javascript"

Browse Popular Code Answers by Language