for(i=0; ele=document.forms[0].elements[i]; i++) if (ele.type=='text' && ele.value=='') alert('¡Pon algo, tron!');