тоесть будет работать если так
<html>
<head>
<script>
window.onload = function(){
var img = document.getElementsByTagName('img');
for(i=0;i<img.length;i++){
var arrMyAttrib=[]
if (img[i].title=="fst"){
arrMyAttrib.push(img[i]);
alert(arrMyAttrib[0].title)
}
}
}
</script>
</head>
<body>
<img width='50' height='50' title='fst' />
<img width='50' height='50' title='snd' />
<img width='50' height='50' title='trd' />
<img width='50' height='50' title='fth' />
<img width='50' height='50' title='ffth' />
</body>
</html>
|