B
bundaism
The code below is meant to go through all images on the page, and add a
red border on the mouseover, and a white border on the mouseout. It's
not working and I've spend too many hours on this - please help!
Thanks... code below....
<img src="someImage.jpg">
<script type="text/javascript">
var img_elems = document.getElementsByTagName("img");
for (var i=0;i<img_elems.length;++i)
{
var img_src = img_elems.src;
img_elems.onmouseover="this.style.borderColor='red'";
img_elems.onmouseout="this.style.borderColor='white'";
}
</script>
red border on the mouseover, and a white border on the mouseout. It's
not working and I've spend too many hours on this - please help!
Thanks... code below....
<img src="someImage.jpg">
<script type="text/javascript">
var img_elems = document.getElementsByTagName("img");
for (var i=0;i<img_elems.length;++i)
{
var img_src = img_elems.src;
img_elems.onmouseover="this.style.borderColor='red'";
img_elems.onmouseout="this.style.borderColor='white'";
}
</script>