I am trying to set atribute to all images. Now I have something like this:
function init(){
imgs = document.images;
for(i=0;i<imgs.length;i++){
imgs[i].alt="test";
}
}
but now I am replace all alts. How to add an attribute only to images that don't have it?