![]()
#31
05-12-07 15:59
dudley #32
05-12-07 19:36
Oggi a scuola mi hanno dato un'esercizio simile ed ho pensato subito a questo topic
Io l'ho risolto così (ho usato javascript), spero sia utile ^^
In sostanza ogni volta che si clicca su un bottone, apre un popup dove c'è l'immagine.Codice:<html> <head> <title>Esercizio: galleria d'immagine</title> <script language="javascript1.1"> function gestione(value) { switch(value){ case 1: window.open("percorso","Foto","width=600,height=600"); break; case 2: window.open("percorso","Foto","width=600,height=600"); break; case 3: window.open("percorso","Foto","width=600,height=600"); break; case 4: window.open("percorso","Foto","width=600,height=600"); break; case 5: window.open("percorso","Foto","width=600,height=600"); break; } } </script> </head> <body> <form name="modulo"> <input type="button" name="IMG_1" value="Immagine 1" onClick="gestione(1);"> <input type="button" name="IMG_2" value="Immagine 2" onClick="gestione(2);"> <input type="button" name="IMG_3" value="Immagine 3" onClick="gestione(3);"> <input type="button" name="IMG_4" value="Immagine 4" onClick="gestione(4);"> <input type="button" name="IMG_5" value="Immagine 5" onClick="gestione(5);"> </form> </body> </html>
![]()
tommy(-_-)L---vercetti ![]()
#33
05-12-07 20:45
whiles ![]()
#34
05-12-07 21:29
L'attributo language è deprecato da secoliOggi a scuola mi hanno dato un'esercizio simile ed ho pensato subito a questo topic
Io l'ho risolto così (ho usato javascript), spero sia utile ^^
In sostanza ogni volta che si clicca su un bottone, apre un popup dove c'è l'immagine.Codice:<html> <head> <title>Esercizio: galleria d'immagine</title> <script language="javascript1.1"> function gestione(value) { switch(value){ case 1: window.open("percorso","Foto","width=600,height=600"); break; case 2: window.open("percorso","Foto","width=600,height=600"); break; case 3: window.open("percorso","Foto","width=600,height=600"); break; case 4: window.open("percorso","Foto","width=600,height=600"); break; case 5: window.open("percorso","Foto","width=600,height=600"); break; } } </script> </head> <body> <form name="modulo"> <input type="button" name="IMG_1" value="Immagine 1" onClick="gestione(1);"> <input type="button" name="IMG_2" value="Immagine 2" onClick="gestione(2);"> <input type="button" name="IMG_3" value="Immagine 3" onClick="gestione(3);"> <input type="button" name="IMG_4" value="Immagine 4" onClick="gestione(4);"> <input type="button" name="IMG_5" value="Immagine 5" onClick="gestione(5);"> </form> </body> </html>
Si usa type="text/javascript".
![]()
miniBill '90 ![]()
#39
06-12-07 17:56