Código HTML:
Ver original<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <meta http-equiv="content-type" content="text/html; charset=utf-8" />
<script type="text/javascript"> //<![CDATA[
function SinEnter(e){
e = e || event;
return (e.keyCode || event.which || event.charCode || 0) !== 13;
}
//]]>
<form action="noenter.html" > <input type="text" name="nombre" value="" onkeypress="return SinEnter(event)"/><br /> <input type="text" name="apellido" value="" onkeypress="return SinEnter(event)"/><br />
Si no tuvieses textareas, y solo fueran input text, podrias aplicar el evento al form
Código HTML:
Ver original<form action="noenter.html" onkeypress="return SinEnter(event)">
Saludos