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

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -