Home > Backend Development > PHP Tutorial > ie8支持ajax的有关问题

ie8支持ajax的有关问题

WBOY
Release: 2016-06-13 10:02:15
Original
994 people have browsed it

ie8支持ajax的问题
ie8中验证码输入报错,无论输入正确还是错误的形式。其他浏览器(火狐,傲游)都好,而且同事的ie8的可以跑起来。我把自己ie8的cookie,插件全清除也不行。请问大侠们,问题会出在哪?
这是ajax代码:
var auth=""; 
function checkForm(){
var check=document.getElementById("check").value; //获取用户输入旳验证码
$.ajax({
type: "POST",  
cache: false,
dataType: "TEXT",
async:false,
url: "{$baseurl}/getauth.php?time="+new Date(),
//url: "{$baseurl}/do.php?model=welcome&act=getauth&time="+new Date(),
success: function(msg){
//alert(msg);
auth=msg;
}
});  
//alert(auth);测试时值为空的,没进入ajax,为什么呢
if(check!= auth){
alert("您输入旳验证码不正确!");
refashImage();
return false;
}
return true;
}
这是getauth获取验证码的代码,获取没问题,
session_start();
class getauth{
public function getauth(){
  // 获取session中旳验证码.
  $auth = $_SESSION['code'];
  echo $auth;
  exit;
  }
}
  $getauth = new getauth();

------解决方案--------------------
其他浏览器(火狐,傲游)都好,而且同事的ie8的可以跑起来

只有你的不幸,那只有找你的ie8算账了
------解决方案--------------------
重装IE8

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template