change img src with inline code

H

Haris Bogdanovic

Hi.

How to change image source with inline code:

<img src="pic1.jpg" onclick=(how to change src attribute
to pic2.jpg ?)>

Thanks
 
E

Evertjan.

Haris Bogdanovic wrote on 20 apr 2011 in comp.lang.javascript:
How to change image source with inline code:

<img src="pic1.jpg" onclick=(how to change src attribute
to pic2.jpg ?)>

onclick="this.src='pic3.jpg';"

Couldn't you have found this out for yourself,
with a little help from your friend Google?
 
D

Denis McMahon

Hi.

How to change image source with inline code:

<img src="pic1.jpg" onclick=(how to change src attribute to pic2.jpg ?)>

Thanks

You might find a thread started by "soonic" in alt.html useful as well.
You seem to be doing similar things and having similar lacks of
understanding.

Rgds

Denis McMahon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top