jQuery get the image src

前端 未结 6 950
醉梦人生
醉梦人生 2020-12-04 16:29

I hope when I click the button, I can get the specific img src and show the img src in the div class img-block block.

HTML



        
6条回答
  •  清歌不尽
    2020-12-04 16:42

    In my case this format worked on latest version of jQuery:

    $('img#post_image_preview').src;
    

提交回复
热议问题