JS gevorderde |
|
<script language="javascript">
verander_image(path,alt)
{
document.images["Image1"].src = path;
document.images["Image1"].setattribute("alt",alt);
document.images["Image1"].setattribute("title",alt); // voor FireFox
}
</script>
<div onmouseover="verander_image('images/1.jpg')">Afbeelding1</div>
<div onmouseover="verander_image('images/2.jpg')">Afbeelding2</div>
<div onmouseover="verander_image('images/2.jpg')">Afbeelding2</div>
<img name="Image1" />
<script language="javascript"> verander_image(path,alt) { document.images["Image1"].src = path; document.images["Image1"].setattribute("alt",alt); document.images["Image1"].setattribute("title",alt); // voor FireFox } </script> <div onmouseover="verander_image('images/1.jpg')">Afbeelding1</div> <div onmouseover="verander_image('images/2.jpg')">Afbeelding2</div> <div onmouseover="verander_image('images/2.jpg')">Afbeelding2</div> <img name="Image1" />
of dit...
|