我正在通过跨域从本地计算机上的文件到远程计算机执行用户身份验证。身份验证工作正常,但无法在远程计算机上设置会话变量以显示用户详细信息。当您输入正确的电子邮件和密码时,它会告知其登录,但确实无法提供用户详细信息。当我登录到远程计算机(http://example.com/login.php)并登录其能够向我提供登录用户的详细信息但在跨域工作时失败
$("#form1").on('submit',function(event){
event.preventDefault();
data = $(this).serialize();
$.ajax({
type: "POST",
url: "http://example/login_script.php",
data: data,
success: function(data) {
$('#log_msg').html(data);
var result = $.trim(data);
if(result==="Logging In"){
window.location = 'details.html'
任何帮助
答案 0 :(得分:0)