Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

disabled any key in JS

<html id="page" onkeydown="return false">
	<script>
  		document.addEventListener('keydown', function (event) {
            if (event.key != "Escape") {
                //do anything that you can stop this function here...
            }
        });
  	</script>
  <!-- your codes here! such as <head>... <body> and others...... -->
</html>
 
PREVIOUS NEXT
Tagged: #disabled #key #JS
ADD COMMENT
Topic
Name
9+3 =