function deleteImg() { images=document.getElementsByTagName('img'); while(images[0]) images[0].parentNode.removeChild(images[0]); }