for (i=0; ele=document.nombreFormulario.elements[i]; i++) if (ele.type == 'text') ele.readOnly = true;