i have an array has preloaded pictures in it. Then i want to load the picture and when the mouse is over that small picture i want it big. but when i try with the functions nothing happens...
I am really new to Javascript so dont judge me :)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<script>
var MyPics = new Array ("pic1.bmp", "pic2.png", "pic3.bmp", "pic4.bmp", "pic5.bmp");
var Preload = new Array();
var $i = 0;
for($i; $i < MyPics.length; $i++) {
Preload[$i] = new Image();
Preload[$i].src = MyPics[$i];
}
</script>
</head>
<body>
<a href="" onmouseover="IncSize()" onmouseout="imgDecr()"> </a>
<img id="pictureone" src="pic1.bmp" width="100">
<script>
function IncSize() {
document.getElementById("pictureone").style.width="200px";
}
function imgDecr() {
document.getElementById("pictureone").style.width="100px";
}
</script>
</body>
</html>