On Click Javascript...

earthboundrocks

Baseband Member
Messages
27
Does anyone have a Javascript that, when you click, an images goes to another?
Just wanna know, may use it.

Thanks,
Earthbound Rrocckkss ;)
 
onclick="imageid.src='the new picture url';" should do it. I think... just off the top of my head really. Although this will only change one picture to another, and you'd have to have another button to change it back.
 
Lord Kalthorn said:
onclick="imageid.src='the new picture url';" should do it. I think... just off the top of my head really. Although this will only change one picture to another, and you'd have to have another button to change it back.
Thanks, but I meant, along the lines of, clicking on a linked image, and it turns into a different image as the page loads... Just wondering.
 
Not sure what you mean... as the Page Loads?

Do you mean like a Box, with a button at the corner, where you can Show and Hide the Contents?
 
Lord Kalthorn said:
Not sure what you mean... as the Page Loads?

Do you mean like a Box, with a button at the corner, where you can Show and Hide the Contents?
No, I mean, when you click on the image, it goes to another, as if a button, being pressed, and when unclicked, it changes back to the image before. :D
 
Back
Top Bottom