<!--Ajax submission script-->
<script>
$(function(){
//Add a click event to the login button
$("#login ").on('click',function(event){
$.ajax({
type:"POST", //The delivery method is POST
url:"{:url('checkLogin ')}", //Set the address of the script file for submitting data processing
data:$("form").serialize(), // //Serialize the current form data before submitting it
', //Set the type of submitted data to json
;
})
})
</script>
Has your problem been solved? I also encountered it, but it was not a runtime cache problem
You can't see it this way. You have to debug with breakpoints to know which part is the problem, such as whether the return value of the program is correct, whether the format received by js is correct, etc.