Skip to content Skip to sidebar Skip to footer

Update 2 Exact Same Images Source Using Javascript

I using PHP captcha called Cryptographer captchan.fr site I need to use 2 captcha on same page but i have problem they do get generated but when i click refresh only first one refr

Solution 1:

You can't have more than one element with same ID on page. That may be why it's only hitting the first one. If you add a class to both images called "captcha" you can easily do this with jQuery:

$('.captcha').attr('src', 'cryptographp.html?cfg=0&&'+Math.round(Math.random(0)*1000)+1);

Post a Comment for "Update 2 Exact Same Images Source Using Javascript"