function handleEnter(field, event) {
var keyCode = event.keyCode ? event.keyCode : event.which
? event.which
: event.charCode;
if (keyCode == 13) {
var i;
for (i = 0; i < field.form.elements.length; i++)
if (field == field.form.elements[i])
break;
i = (i + 1) % field.form.elements.length;
field.form.elements[i].focus();
return false;
} else
return true;
}
<input type="text" id="phoneOneDoc" name="phoneOneDoc"
value="${offical.phoneOneDoc }" maxlength="11"
style="width: 180px;"
οnkeypress="return handleEnter(this, event)" οnkeyup="value=value.replace(/[^\d\.]/g,'')"/>