JQuery change the value of an <img

后端 未结 5 1652
旧时难觅i
旧时难觅i 2021-02-05 12:28

I need some simple JQuery code so I can change the src value of a specific img.

It\'s currently:


<         


        
5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-05 13:24

    That's elementary, use jQuery attr...

    $('img#myImage').attr('src', 'image2.gif');
    

提交回复
热议问题