Hello, I would like to cancel the Enter key from being pressed like the below, but I would like to do it without the inline onkeydown="return CancelEnterHit(event);" and instead use addEventListener.
Btw, I don't need any cross-browser help. If I can just get this going in FF I should figure the rest out ok(atleast I hope
).
Code:
<script type="text/javascript">
function CancelEnterHit(e){
if(e.keyCode == 13)
return false
return true;
}
</script>
<input onkeydown="return CancelEnterHit(event);" id="cancelme" />
Bookmarks