Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

点击验证码怎么刷新呢?需要另写js或jquery吗 小白求教 #61

Closed
liwenhang opened this issue Mar 20, 2018 · 2 comments
Closed

Comments

@liwenhang
Copy link

No description provided.

@liwenhang liwenhang reopened this Mar 20, 2018
@liwenhang
Copy link
Author

$(".captcha-img").click(function(){
var timestamp = new Date().getTime();
$(this).attr('src',$(this).attr('src') + '?' +timestamp );
})

@hjijin
Copy link

hjijin commented Aug 10, 2018

$(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 })

huacnlee added a commit that referenced this issue Mar 7, 2019
…#73

Add onclick event for captcha img, to click refresh #61
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants