Thinkphp Thinkphp5 Thinkphp5.1 点击刷新验证码,点击更换验证码

一、在Thinkphp中引入验证码类

<img src="{:captcha_src()}" onclick="this.src='/captcha?id='+Math.random()" alt="验证码" title="点击刷新" style="cursor: pointer">