Jump to content

Java Script problem


Recommended Posts

hey, i'm new to javascript, and I tried the animated banner code on my site as taught on this site. It worked fine with the first button, it changed colour when highlited, then when I repeat the code and attempt to do the same to my next button, not only does it not work but it stops the other one from working again.I used this <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> when i did this I then copied it and wrote out the next thing but it doesn't work. both of them now stay on the mouseout image. can anyone help me?

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...