ie8支持ajax的问题
时间:2011-08-02
来源:互联网
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获取验证码的代码,获取没问题,
<?php
session_start();
class getauth{
public function getauth(){
// 获取session中旳验证码.
$auth = $_SESSION['code'];
echo $auth;
exit;
}
}
$getauth = new getauth();
这是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获取验证码的代码,获取没问题,
<?php
session_start();
class getauth{
public function getauth(){
// 获取session中旳验证码.
$auth = $_SESSION['code'];
echo $auth;
exit;
}
}
$getauth = new getauth();
作者: zongwuzong 发布时间: 2011-08-02
其他浏览器(火狐,傲游)都好,而且同事的ie8的可以跑起来
只有你的不幸,那只有找你的ie8算账了
只有你的不幸,那只有找你的ie8算账了
作者: xuzuning 发布时间: 2011-08-02
重装IE8
作者: rczjp 发布时间: 2011-08-02
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28