/ Published in: JavaScript
Firefox ignores the alt tag on images and uses the title tag whereas IE uses the alt tag. This javascript code copies the text in all image alts to the image's title. Best when placed at the footer of each page
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<script type="text/javascript"> var images = document.getElementsByTagName('img'); for (i = 0; i < images.length; i++) { images[i].title = images[i].alt; } </script>