There is no response when clicking the login button.
2018-04-10 22:32:01
0
5
2108

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

reply all(4)
Frank

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

  • reply 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 author 2018-04-25 11:46:41
悉阳桑
    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


时光@记忆

(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

时光@记忆

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

  • reply 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.
    author 2018-04-11 21:09:35
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template