简体   繁体   中英

Javascript Code To Refresh This Kind Of Captcha

Guys i am looking for refreshing Captcha without refresh the page , and there is no refresh button ... is there anyway i can make this work out ?

this is the captcha part in the HTML document , i could'nt find the class section .

     <img class="captcha" border="0" src="https://www.gametwist.com/web/Captcha-Image/? 
     bc=000000&fc=188eae&h=58&w=258&fill=ffffff" alt="captcha image">

The simplest way would be adding some random or timestamp parameter so that browser had to make new request, downloading new image. For example:

document.querySelector('.captcha').src += '&_=' + Date.now();

This code will append new GET parameter to query string similar to &_=1420922523150 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM