Demo of event which to know which key is pressed in Jquery

Press any key





HTML


<div id='t1' style="position:absolute;"></div>

jquery


<script>
$(document).ready(function() {

$(document).keydown(function(){
$("#t1").html('You  Pressed key No: ' + event.which);
});

})
</script>