$(function(){
$("#login").on('click',function(event){
$.ajax({
type: "POST", //The submission method is POST
url:"{:url('checkLogin')}", //Set the address of the script file for submitting data processing
data:$("form").serialize(), //Serialize the data of the current form and submit it later
dataType:'json', //Set the type of submitted data to json
success:function(data){ //Only if the return flag is 1, it will be processed
alert(data.status);
}
})
})
})
You can click to see