I need to delete or hide the Img tag or its parent when Img have src="".
I have a script but it is not working..
window.onload=function(){ var imgs = document.getElementsByTagName("img"); for(var i = 0; i < imgs.length; i++) { var img = imgs[i]; if(img.src==""){ img.parentNode.removeChild(img); } } }
Its is not finding the img having scr="". while in IE and Safari is is showing cross sign ( Red ).
Can anybody help.
Thanks.