Such as this 2nd example: http://javascript.aho.ru/example/JsPrimeryCode-67.htm (with cyrillic font), but need to write onmouseover insread onclick. And to preload pictures automatically by onload.
Code:
<table align=right width=420 height=340 border=1 cellspacing=0><tr><td align=center>
<img id=i1 src="snow.gif"><br>
<u><b id=d1>(place for caption)</b></u></td></tr></table><br>
<B>Preloading images.</B><br><br>
<SCRIPT>d=document;g=function(X){return document.getElementById(X)}
aimg='snow.gif,snow21.gif,fo167-YM20030829-1.jpg,Imaf4-YM20041031.jpg'.split(',');
adiv='snow;snow21;summer;autumn'.split(';');
preloadPict=function(i){aim=[];for(i=0;i<aimg.length;i++){aim[i]=new Image();aim[i].src=aimg[i];
name=d.getElementsByName('ahref')[i].innerHTML=adiv[i];}}
viewPict=function(i){if(!self.aim)preloadPict();if(!self.aim||!self.aim[aimg.length-1])return;
g('i1').src=aim[i].src;g('d1').title=g('d1').innerHTML=adiv[i];}
onload=preloadPict
</SCRIPT><br><br>
View by mouseover:<br>
<a href=# name=ahref onmouseover=viewPict(0);return!1>1</a><br>
<a href=# name=ahref onmouseover=viewPict(1);return!1>2</a><br>
<a href=# name=ahref onmouseover=viewPict(2);return!1>3</a><br>
<a href=# name=ahref onmouseover=viewPict(3);return!1>4</a><br><br>
This code is placed for example on http://javascript.aho.ru/example/JsPrimeryCode-67a.htm .
Bookmarks