Stealing this from here:
<script type="text/javascript">
$(function () {
document.onkeydown = function () {
switch (window.event.keyCode) {
case 37:
alert('left');
break;
case 38:
alert('up');
break;
case 39:
alert('right');
break;
case 40:
alert('down');
break;
}
};
});
</script>
No comments:
Post a Comment