<script>
function refreshVerify(){
var ts = Date.parse(new Date())/1000;
$("#verify_img").attr("src", "/captcha?id="+ts);
}
</script>
<script> function refreshVerify(){ var str = Date.parse(new Date())/1000; $('#verify_img').attr("src", "/index.php/captcha?id="+str); }</script>
After testing, this works
Pay attention to the naming of verify and verity. The teacher used two names. Check to see if you have mistaken ty and fy.
This is how I wrote it
{:captcha_src()}?id="+ts);//Refresh verification code
Open the console and see if it reports 404 The path is wrong,
Go to the js community and ask
<script>
function refreshVerify(){
var str = Date.parse(new Date())/1000;
$('#verify_img').attr("src", "/index.php/captcha?id="+str);
}
</script>
After testing, this works
Pay attention to the naming of verify and verity. The teacher used two names. Check to see if you have mistaken ty and fy.
This is how I wrote it
var ts = Date.parse(new Date())/1000;
{:captcha_src()}?id="+ts);//Refresh verification code
Open the console and see if it reports 404 The path is wrong,
Go to the js community and ask