I most likely just made a stupid error somewhere, but i cant find it...
I just started learning javascript yesterday and i wrote the following program to find the keycodes for the keyboard

Javascript Practice
<script language = "javascript" type = "text/Javascript">
document.onKeydown = keyHit();
function keyHit()
key = window.event.keyCode;
document.write("You pressed Keycode " + key + "<BR><BR>");

might someone tell me what is wrong with it? i run internet explorer