Ver originalvar i = 1;while(document.getElementById('producto_' + i)){ document.getElementById('producto_' + i).style.display = 'none'; i++;}