<script language="JavaScript1.2">
//CHECKS IF THE ENTER WAS PRESSED
function netscapeKeyPress(e) {
if (e.which == 13)
alert('Enter pressed');
}
function microsoftKeyPress() {
if (window.event.keyCode == 13)
alert('Enter pressed');
}
if (navigator.appName == 'Netscape') {
window.captureEvents(Event.KEYPRESS);
window.onKeyPress = netscapeKeyPress;
}
</script>
<body onKeyPress="microsoftKeyPress()" >