In IE, the verification code will not be refreshed, but there is no problem with Google and other browsers. The solution is to add a random parameter after the switching address of the Verification Code. Today, we found it in IE when doing the verification code, the verification code will not be refreshed, but Google and other browsers will be fine, so I think it should be a cache problem, because the default setting of IE is that if the access address does not change, it will not be obtained but will load the content in the cache.
Therefore, the solution is to add a random parameter to the switch address of the verification code.
For example:
The Code is as follows:
Script
// Change the verification code
Function changeimg (){
/*
Math. the random range is 0-1.
* 999 to 0-999
+ 3000 is 3000-3999
*/
Var time = Math. round (Math. random () * 999) + 3000;
$ ('# Captcha'). attr ('src', '/index. php/Public/verify/time/' + time );
}
Script