/ Published in: JavaScript
Wasn't fully tested :) Just for reference...
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function picload(){ var imagesl = ['pic1.png','pic2.png','pic3.png']; var objects = new Array(); for(var i=0;i<imagesl.length;i++){ objects[i] = document.createElement('img'); objects[i].setAttribute('src', "path-to-pics/"+imagesl[i]); } }