Jump to content

animated buttons


Tyrant

Recommended Posts

I have two buttons on my site, which I want both to act the same. This is the good old w3 tutorial script which I use:

<html><head><script type="text/javascript">function mouseOver(){document.b1.src ="b_blue.gif"}function mouseOut(){document.b1.src ="b_pink.gif"}</script></head><body><a href="http://www.w3schools.com" target="_blank"onmouseOver="mouseOver()"onmouseOut="mouseOut()"><img border="0" alt="Visit W3Schools!"src="b_pink.gif" name="b1" /></a></body></html>

Now this just works fine if I use it on one button, but it stopps working when I try to use it on many buttons. I just use this part of script both for my first and second button:

<a href="http://www.w3schools.com" target="_blank"onmouseOver="mouseOver()"onmouseOut="mouseOut()"><img border="0" alt="Visit W3Schools!"src="b_pink.gif" name="b1" />

I already understood that I`m doing wrong, I searched for topics like this, but unfortunately there wasn`t said anything about bigger amounts of animated buttons, that are acting the same.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...