当他登录时,我能够将用户保持在同一页面上,Firefox
但IE
它会加载 wamp 文件夹目录。我认为这是一个错误,可以修复吗?为了让用户在登录时保持在同一页面上,是否有特定的代码可供使用?
我使用的代码是 PHP 和 ajax 的混合,但 ajax 在下面;
function logMeIn(){
var poststr="email="+$("#email").val()+"&password="+$("#password").val();
$.ajax({
type: "POST",
url: "../script/sendLogDetails.php",
data: poststr,
success: function(str){
switch (str){
case "1":
alert("Can't connect to server - please retry later."); // Can't connect to server
break;
case "2":
alert("Can't connect to database - please retry later."); // Can't connect to database
break;
case "3":
alert("Account access problem - please retry later."); // Account access details
break;
case "4":
alert("Invalid log in details - please retry."); // invalid login details
break;
default:
window.location="";
break;
}
}
});
}