Home  >  Q&A  >  body text

There is no response when clicking the login button.

I typed the code based on it. Why is there no error or any response when clicking the login button?

2356 days ago2047

reply all(5)I'll reply

  • Frank

    Frank2018-04-25 10:57:45

    I also encountered this problem, please comment this part.
    1.jpg

    reply
    1
  • Frank

    No comment is required. If you comment it, you will not be able to use it after logging out. Change the namespace. use think\facade\Session; add facade

    Frank · 2018-04-25 11:46:41
  • 悉阳桑

    悉阳桑2018-04-18 20:07:45

        success:function(data){
    					    if(data.status ==1){
    						   alert(data.message);
    						   window.location.href="{:url('index/index')}";
    						   window.location.href = "{:url('index/index')}";
    						}else{
    						   alert(data.message);
    						   window.location.href="{:url('login/index')}";
    						   window.location.href = "{:url('login/index')}";
    						}
    					}					
    				});
    				return false;   //加入false


    reply
    0
  • 时光@记忆

    时光@记忆2018-04-16 22:10:02

    (type='button') when it is just a button. When the onclick() event is not added, nothing will happen. And (type="submit") will submit the form to the server

    reply
    0
  • 时光@记忆

    时光@记忆2018-04-11 10:41:47

    Check whether the button has added a listening event. Add alert() function check to the listening code

    reply
    0
  • If the login button type is submit and the onclick time is added, you can see the information, but if the type is button, nothing will happen.

    · 2018-04-11 21:09:35
  • Cancelreply