Nel codice HTML, ad ogni <img ...> che trovi gli devi dare un nome (tipo id="img_0")
poi, sempre nel codice HTML (devi lavorare sempre li)
aggiungi queste righe tra i tag <head> e </head> (dove non ha importanza).
<script language="javascript">
var path = "percorso\delle\foto\";
function load_images()
{
document.getElementById('img_0').src= path + "nomefoto.gif";
...
document.getElementById('img_N').src= path + "nomefoto.gif";
}
</script>
ed infine, nel tag <body> aggiungi:
onload="javascript:load_images()"
così : <body onload="javascript:load_images()">
P.S. Javascript si scrive tutto attaccato !!!
![]()



... San Antonio Spurs~ 2003/5 NBA champions)
Rispondi quotando