function changeImage(id,img)2 JavaScript functions that modify the color or the image of an ID. You just need to set the ID and the path of the file or the color (Depending on the function). I guess the name of each function gives you the biggest hint .
{
newImage = "url("+img+")";
document.getElementById(id).style.backgroundImage = newImage;
}
function changeColor(id,color)
{
document..getElementById(id).style.backgroundImage = color;
}
Friday, February 23, 2007
Change Image, Change Collor
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment