Image Rollover
Page 1
Page 2
Page 3
Page 4
Just Discovered
To set up the image or link rollover effect
You need a function with an array of images,
You need to create the innerHTML from the load area (the div tag),
You need to change it to the new image index (passed as a parameter).
include a body onload event since there is nothing in the div at startup.
include a table (optional) for presentation.
See the code below:
function changeImage(loadarea, imgindex){ var imagesArray=new Array('../images/Laura_unfinished_01_m.jpg', '../images/Laura_unfinished_02_m.jpg', '../images/Laura_unfinished_03_m.jpg', '../images/Laura_unfinished_04_m.jpg', '../images/Laura_finished_01_m.jpg' ) var imgobj=document.getElementById(loadarea) var newHTML = '
' ; imgobj.innerHTML = newHTML } . . . . . .
Page 1
Page 2
Page 3
Page 4
Just Discovered
. . .
back