1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
| <html>
<head>
<script language="javascript">
fonction changeimage (nomimage,x,y,a,b){
document.getElementById("smile").src = nomimage;
document.getElementById("smile").shape.area.coords = x,y,a,b;
}
</script>
</head>
<body>
<SCRIPT LANGUAGE="javascript">
var nomimage = "cabinet.jpg";
var x=100;
var y=0;
var a=125;
var b=25;
document.write('<IMG SRC=nomimage width:200; height:150; ID=smile STYLE="position:absolute;top:100;left:100">');
</SCRIPT>
<a href="#" onclick="changeimage(image1.jpg,0,0,25,25);">Afficher image 1</a>
<a href="#" onclick="changeimage(image2.jpg,175,0,200,25);">Afficher image 2</a>
<a href="#" onclick="changeimage(image3.jpg,0,125,0,150);">Afficher image 3</a>
</body>
</html> |
Partager