My DOM looks like this:
(我的DOM看起来像这样:)
<div id="d1">
<div class="c1">
<a href="#"><img src="img1_on.gif"></a>
<a href="#"><img src="img2_on.gif"></a>
</div>
</div>
When someone clicks on an image, I want the image src to change to <img src="imgx_off.gif">
where x
represents the image number 1 or 2.
(当有人单击图像时,我希望图像src更改为<img src="imgx_off.gif">
其中x
表示图像编号1或2。)
Is this possible or do I have to use CSS to change the images?
(这可能吗,还是我必须使用CSS来更改图像?)
ask by user67033 translate from so