简体   繁体   中英

Changing ONE div background to several images when links on page are hovered

I have a page I am working on that has several links, but has a persistent area where a background fades into a new image when any of those links are hovered over. sort of like this script: http://www.dynamicdrive.com/dynamicindex4/thumbnail2.htm

except the only option with that script is to have those links target that large image, I need those links to go to separate places entirely.

What can I do about this? Thanks for the help.

You would just place this code within each of the small images and change the 'where_you_want_it_to_go' part, depending on the destination.

onmouseover=document.getElementById('where_you_want_it_to_go').innerHTML= '<img src="image.jpg/>';"

Is this what you were looking for?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM