Ciao ragazzi!
girando sul forum ho trovato lo script di cui ho bisogno pero ho una domanda.
Codice PHP:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"
<
html
<
head
<
title>Untitled Document</title
<
meta http-equiv="Content-Type" content="text/html; charset=utf-8"
<
script language="JavaScript" type="text/JavaScript"
function 
preloadImgs(args) { 
    for(var 
n=0;n<arguments.length;n++) { 
        
preloadImg(arguments[n]); 
    }     
    
//funzione che precarica un immagine 
    
function preloadImg(percorso) { 
        var 
temp=new Image(); 
        
temp.src=percorso
    } 

function 
_removeChild(parent,child){ 
    if(
child != null){ 
        
parent.removeChild(child); 
    } 
}; 
function 
changeImg(el){ 
    var 
ext'.png'
    var 
targetdocument.getElementById("target"); 
    if(!
target){return;} 
     var 
optionValue el.options[el.selectedIndex].value
    var 
currentImageoptionValue.concat(ext); 
    var 
img document.createElement("img"); 
    
img.srccurrentImage
    var 
tmptarget.getElementsByTagName('img').item(0); 
    
_removeChild(target,tmp); 
    
target.appendChild(img); 

window.onload = function(){ 
    
preloadImgs('cod2.png','cod4.png','cod6.png','cod8.png'); 
    var 
sel document.getElementById("my-select"); 
    
sel.onchange=function(){ 
        
changeImg(sel);  
    } 

</script> 

</head> 

<body> 
<form id="frm" action="" method="post"> 
<select name="myselect" id="my-select" size="1"> 
    <option value ="cod2">Call of Duty 2</option> 
      <option value ="cod4">Call of Duty 4</option> 
      <option value ="cod6">Call of Duty MW2</option> 
      a<option value ="cod8">Call of Duty MW3</option> 
</select> 
</form> 
<div id="target"></div> 
</body> 
</html> 
E possibile far caricare una delle immagini all'apertura della pagina senza dover selezionare?