通过单击按钮更改图像 [英] change image by button click
本文介绍了通过单击按钮更改图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有面板控件.该控件同时具有侧面下一个和上一个按钮控件.如何通过按按钮更改图像.
I have panel control.That control have both side next and previous button control. How I can change image by pressing buttons.
推荐答案
我建议使用jQuery.
处理按钮单击事件:
http://api.jquery.com/click/ [ http://api.jquery.com/attr/#attr2 [ http://docs.jquery.com/Tutorials:How_jQuery_Works [ http://docs.jquery.com/Tutorials [ http://docs.jquery.com/Main_Page [
I would advise using jQuery.
Handling a button click event:
http://api.jquery.com/click/[^].
Changing the image by changing the value of attributesrc
of the elementimg
:
http://api.jquery.com/attr/#attr2[^].
If you are not well familiar with jQuery yet, I would advise to learn some jQuery if you want advanced JavaScript UI with good feature and maintainability. You can start here:
http://docs.jquery.com/Tutorials:How_jQuery_Works[^],
http://docs.jquery.com/Tutorials[^],
http://docs.jquery.com/Main_Page[^].
—SA
这篇关于通过单击按钮更改图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文