Effetto lente di ingrandimento su di un'immagine.
<HTML>
<head>
<title>Demo dhtml - www.risorse.net</title>
<script language="JavaScript">
//funzione che ingrandisce
function lentep() {
//l'ingrandimento avviene moltiplicando per 2 i valori
//di altezza e larghezza dell'immagine
document.img1.width=document.img1.width*2
document.img1.height=document.img1.height*2
}
//funzione che rimpicciolisce
function lentem() {
//idem come sopra ma dividendo per 2
document.img1.width=document.img1.width/2
document.img1.height=document.img1.height/2
}
</script>
</head>
<body>
<center>
<h2>Lente di ingrandimento su immagine</h2>
<br>
<a href="#" onMouseOver="lentep()" onMouseOut="lentem()">
<img name="img1" src="foto2.jpg" width=120 height=80 border=1>
</a>
</center>
</body>
</HTML>
![]()