E no che non ti eri spiegato. Il fatto che debba funzionare solo all'interno di una textarea è saltato fuori adesso…
codice:
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Pagina vuota</title>
<script type="text/javascript">
function noReturn(oPssEvt) {
var oKeyEvent = oPssEvt || window.event;
if (oKeyEvent.keyCode === 13) { document.form.submit(); } // invio
}
</script>
</head>
<body>
<form method='POST' name='form'>
<textarea name='commento' onkeypress="noReturn(event);"></textarea>
</form>
</body>
</html>