Hi there brucewayne,
and a warm welcome to these forums. 
Further to what xelawho has said, there are some other reasons for your script failure.
You are missing a closing double quote here...<script type="text/javascript>
...which means that the script will never run. 
Although you can set this... var a=document.getElementsByTagName('img');
...before the page loads, you cannot access the actual elements until after. 
This following will resolve these issues...
Code:
<script type="text/javascript">
var a=document.getElementsByTagName('img');
function init(){
for(c=0;c<a.length;c++) {
alert(a[c].getAttribute('src'));
}
}
window.addEventListener?
window.addEventListener('load',init,false):
window.attachEvent('onload',init);
</script>
coothead
Bookmarks