Demo of keydown event using JQuery

Press any key to trigger keydown event




HTML


Press any key to trigger keydown event

jquery


<script>
$(document).ready(function() {
$(document).keydown(function(){
alert('hi');
});
})
</script>