EDIT: anzi, piu' semplicemente:codice:<script type="text/javascript"> function enter_textarea(campo,evento) { codice_tasto = evento.keyCode ? evento.keyCode : evento.which ? evento.which : evento.charCode; if (codice_tasto == 13) { if (evento.shiftKey) return true; // e' un 'a capo' document.mioform.submit(); return false; } return true; } </script>
codice:<script type="text/javascript"> function enter_textarea(campo,evento) { codice_tasto = evento.keyCode ? evento.keyCode : evento.which ? evento.which : evento.charCode; if (codice_tasto == 13 && !evento.shiftKey) { document.mioform.submit(); return false; } return true; } </script>

Rispondi quotando