<script>
//Add a click event to the login button
$(function(){
$("#login").on('click',function(event){
$.ajax({
type:"POST", //Submission type
url:"{:url('checkLogin')}", //Handler's url
data:$( "form").serialize(),//Serialize the data of the current form and then submit it
 
This is my mistake, please give me some advice