javascript - Push attributes to array by className? -


can please me how push different attributes of elements same classname array? i'm not @ javascript , have tried arrays turns empty.

one array should contain url of images , other 1 image-texts in span-element:

function slideshow(){   imgurllist.length = 0;   imgtextlist.length = 0;   var imgurl = document.getelementsbyclassname('markedimg');   var imgtext = document.getelementsbyclassname('marked');   for(j=0; j<imgurl.length; j++){     imgurllist.push(imgurl.src);   }   for(k=0; k<imgtext.length; k++){     imgtextlist.push(imgtext.innerhtml);   }   openwindow(); } 


Popular posts from this blog

Php - Delimiter must not be alphanumeric or backslash -

c# - How to change the "Applies To" field under folder auditing options programatically (.NET) -

c++ - Ambiguity when using boost::assign::list_of to construct a std::vector -