non e' strettamente necessario passare per l' attributo
if(el.type=="text"){...}