如何使用 JavaScript 在点击时更改图像?
我在此处创建了一个滑动图像查看器。正如您所看到的,有 4 个可点击的小图像来更改/滑动图像。我希望将小图像更改为此图像 alt text http:// beta.d-load.org/images/etc/imagev-on.png 当它被点击时,或者当适当的主图像显示时。这样用户就可以知道正在显示哪个主图像。任何人都可以查看源代码并解释如何执行此操作吗?谢谢!
I've created a sliding image viewer here. As you can see, there's 4 small clickable images to change/slide the image. I want the small image to change to this image alt text http://beta.d-load.org/images/etc/imagev-on.png when it's clicked, or when the appropriate main image is showing. That way the users can tell which main image is being shown. Can anyone maybe look at the source and explain how to do this? Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试以下代码!
给你,演示:http://jsfiddle.net/qTB9g/< /a>
try the following code !!
Here you go, Demo : http://jsfiddle.net/qTB9g/