<select id="imgList"></select>
function showImagesList() { var a = document.getElementsByTagName('img'), b = ''; for(i=0; i<a.length; i++) b += '<option>'+a[i].src+'</option>'; document.getElementById('imgList').innerHTML = b; } showImagesList();