My DOM looks like this:
16条回答 醉话见心 (楼主) 2020-11-22 02:10 In case you update the image multiple times and it gets CACHED and does not update, add a random string at the end: // update image in dom $('#target').attr('src', 'https://example.com/img.jpg?rand=' + Math.random()); 0 讨论(0) 查看其它16个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复
In case you update the image multiple times and it gets CACHED and does not update, add a random string at the end:
// update image in dom $('#target').attr('src', 'https://example.com/img.jpg?rand=' + Math.random());