Look at the code first:
1 $ (". Verify_img"). Click (function() {2 varnew Date ( ). GetTime (); 3 var url = "{: U (' index/loginverify ')}&t=" +TimeNow; 4 alert (URL); 5 $ (this). attr ("src", url)6 });
The above code causes the verification code click Switch causes the CAPTCHA picture to be unable to display.
Then look at the following code:
$ (". Reloadverify"). Click (function() { varnew Date (). GetTime (); var url = "{: U (' index/loginverify ')}?t=" +TimeNow; $ ("#image_d"). attr ("src", url) });
What is the area of the above code? and the difference between &. After comparison, you can see where the problem lies. It is also valid to follow a random number directly after the question mark. var url = "{: U (' index/loginverify ')}?" +math.random ();
It is clear that the problem is here.
thinkphp learn to use-verification code accidentally made a mistake