IMG SRC tags and JavaScript

前端 未结 13 1144
眼角桃花
眼角桃花 2020-12-02 02:09

Is it possible to call a JavaScript function from the IMG SRC tag to get an image url?

Like this:





        
相关标签:
13条回答
  • 2020-12-02 02:39

    You might be able to do it on the server side. Alternately you could attach an onload event to swap the image src out. I guess the question then becomes, why would you have to use Javascript in the first pace?

    0 讨论(0)
提交回复
热议问题