// FormName is the name value of the form. // FieldName is the name value of the field // to be focused. document.FormName.FieldName.focus();
Or by element ID:
// FieldId is the id value of the field // element to be focused. document.getElementById('FieldId').focus();
There you go, the tiny focus() function is what we all need.