How to refresh the src of

前端 未结 4 1955
小鲜肉
小鲜肉 2020-12-03 01:30

where test.php generates an image with a random number.

Itried :

$(\'#verifyimage\').click(f         


        
4条回答
  •  生来不讨喜
    2020-12-03 01:46

    Add a timestamp or a random number:

    var timestamp = new Date().getTime();
    $(this).attr('src',$(this).attr('src') + '?' +timestamp );
    

提交回复
热议问题