Closed liwenhang closed 6 years ago
$(this).attr('src',$(this).attr('src') + '?' +timestamp );
There is a problem,the timestamp will accumulate.
this is ok:
$(".rucaptcha-image").click(function(e){ var currentSrc = $(this).attr('src'); $(this).attr('src', currentSrc.split('?')[0] + '?' + (new Date()).getTime()); return false })
$(".captcha-img").click(function(){ var timestamp = new Date().getTime(); $(this).attr('src',$(this).attr('src') + '?' +timestamp ); })