The reason why there is no response when you press the button may be because the () and {} positions near the asynchronously submitted function are wrongly matched. This is how I wrote it.
熟悉使用PHP9的Spidey
熟悉使用PHP9的Spidey 2018-04-15 19:07:06
0
1
1136

$(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);

}

})

})

})


熟悉使用PHP9的Spidey
熟悉使用PHP9的Spidey

reply all(1)
特瑞克斯

You can click to see

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!