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