TP experts help me see, the verification code cannot be refreshed ,. Is there a problem with JS?
Script // var captcha_img generated by the verification code =$ ('# captcha-INER '). find ('IMG ') var verifyimg = captcha_img.attr ("src"); captcha_img.attr ('title', 'Click refresh'); captcha_img.click (function () {if (verifyimg. indexOf ('? ')> 0) {$ (this ). attr ("src", verifyimg + '& random =' + Math. random ();} else {$ (this ). attr ("src", verifyimg. replace (/\?. * $/, '') + '? '+ Math. random () ;}}); script
Verification code:
Reply to discussion (solution)
First, make sure that the address Home/Index/verify_c can be refreshed and changed to a verification code.
Second, will your address be automatically assigned? Random = 2 to/random/2.
I didn't see the onclick code of the img click event. will TP be generated for you?
Please check in the source code of the browser page
First, check whether the loaded URL can generate a verification code normally. then, check whether the js code can properly load the click event by img. Finally, click to refresh.
First, use firebug to check if any js error is reported, and then track it in the click event step by alert ('test ').
Solved. thank you.