ecco la pagina che ho usato per testarlo:
codice:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Documento senza titolo</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
function check(obj, evt)
{
var charCode = (evt.charCode)?evt.charCode : ((evt.which)?evt.which:evt.keyCode)
var key = charCode
if (key==13) {
do
if (obj!=null && obj.nextSibling!=null) obj=obj.nextSibling
else obj=obj.parentNode.firstChild
while (obj.nodeType!=1)
obj.focus()
return false
}
return true
}
</script>
</head>
<body>
<form name="form1" method="post" action="">
<input name="field1" type="text" id="field1" onKeyPress="check(this, event)" />
<input name="field2" type="text" id="field2" onKeyPress="check(this, event)" />
<input name="field3" type="text" id="field3" onKeyPress="check(this, event)" />
</form>
</body>
</html>
Con IE6 e firefox 1.5 a me funziona.