我尝试使用ajax登录后打开另一个页面,但登录后无法打开以下页面。
$.ajax({
url:"http://localhost:8081/CC_APIS/apis/login.php",
method:"POST",
dataType:"JSON",
data:{username : u_username,password : u_password},
success:function(data){
console.log(data);
if(data.rows>0){
window.location.href="lessonBooking.html";
}else{
console.log("user not found");
}
},
error:function(err){
console.log(err);
}
});