There is no response when I click to log in at about 2 minutes and 55 seconds, and there is no problem with the code.
黄子乐
黄子乐 2017-11-07 20:25:28
0
10
1344

public function checkLogin(Request $request)

{

//Initial return parameters

$status = 0;

$result = ' ';

$data = $request -> param();


return ['status'=>$status, 'message'= >$result, 'data'=>$data];

}

$(function(){

//Add a click to the login button Event

$(#login).on('click', function(event){

$.ajax({

type: "POST",

url: "{:url('checkLogin')}",

data: $("form").serialize(), //Serialize the current form data before submitting it

dataType: 'json',

success: function(data){ //Only if the return flag is 1, it will be processed

alert (data.status);

}

});

})

})


##

黄子乐
黄子乐

reply all(3)
苦橙。

It doesn’t work when I click to log in here. Can you help me take a look?

Public Function Checklogin (Request $ Request)

{

## // Initialization Back parameters

$ Status = 0;

# $ result ='';

$data = $request->param();

return ['status'=>$status,'message'=>$result,' data'=>$data];

}

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

data:$("form").serialize(),//Serialize the data submitted by the current script and then submit it

dataType:'json',//Set the type of submitted data to JSON

success:function(data){

alert(data);

}

});

})

})

酱油哎呦

Handsome guy, the semicolon there, I have the same problem

  • reply $rule = [ 'name'=>'require', 'password'=>'require', 'verify'=>'require|captcha' ];The last semicolon
    黄子乐 author 2017-11-07 21:57:35
  • reply Reply Huang Zile: I found it. Anyway, thank you.
    酱油哎呦 author 2017-11-07 22:15:28
  • reply Haha, it’s almost done anyway. I’m exhausted after searching for a long time, but I still don’t have a solid foundation. . .
    黄子乐 author 2017-11-07 22:16:45
  • reply Dude, have you found the problem?
    苦橙。 author 2017-11-16 12:03:29
  • reply doge/..This is two minutes and 55 seconds. I didn’t even hit you.
    酱油哎呦 author 2017-11-07 22:01:04
黄子乐

Already found it. I just accidentally missed a semicolon. Sorry to trouble everyone. . .

  • reply What's going on? Mine won't pop up either. What's the problem?
    一个华安丶两只眼 author 2017-11-21 20:20:48
  • reply I also want to know what's going on. Mine can't pop up, and nothing happens when I click to log in.
    咿呀咿呀哟 author 2018-02-26 10:16:27
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!