
February 21st, 2013, 10:43 PM
|
 |
Contributing User
|
|
|
|
You can combine the two titles; like so:
Code:
<script>
function reTitle(img1,img2)
{
var pic1 = document.getElementById(img1);
var pic2 = document.getElementById(img2);
pic1.title = pic1.title + pic2.title;
pic2.title = pic1.title;
}
window.onload = function() {
new reTitle('pic1','pic2');
new reTitle('pic3','pic4');
}
</script>
<img id="pic1" src="any.jpg" title="any"/>
<img id="pic2" src="body.jpg" title="body"/>
<img id="pic3" src="can.jpg" title="can"/>
<img id="pic4" src="not.jpg" title="not"/>
|