xmlHttp怎么在firefox下不能保存呀!

yufeng1312 2009-04-07 07:44:13
xmlHttp怎么在firefox下不能保存呀!
大家帮帮忙积分比较少了一点呀!

var xmlHttp = false;
try {
xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e2) {
xmlHttp = false;
}
}
if (!xmlHttp && typeof XMLHttpRequest != 'undefined') {
xmlHttp = new XMLHttpRequest();
}

xmlHttp.open("POST", "saveuser.asp", true);
xmlHttp.setRequestHeader('Content-type','application/x-www-form-urlencoded');
xmlHttp.onreadystatechange = saveuser;
xmlHttp.send("username="+escape(username)+"&password="+escape(password)+"&email="+escape(email)+"&truename="+escape

(truename)+"&sex="+escape(sex)+"&phone="+escape(phone)+"&mobile="+escape(mobile)+"&addr="+escape(addr)+"&province="+escape

(province)+"&addr="+escape(addr)+"&zip="+escape(zip)+"&age="+escape(age)+"&question="+escape(question)+"&answer="+escape

(answer)+"&oicq="+escape(oicq)+"&web="+escape(web));
}
}
function saveuser() {
if (xmlHttp.readyState < 4) {
d_username.innerHTML="loading…";
}
if (4==xmlHttp.readyState){
if (200==xmlHttp.Status){
var date=xmlHttp.responseText;
if (date==1){
alert("The user registers successfullyd!");
//window.location.href='\/exhibit';
window.location.href="/";
}else{
alert("User has been used, please replaced !");
window.location.href="register.asp";
}
}else{
alert("error");
}
}
}
...全文
77 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
nick207 2009-04-07
  • 打赏
  • 举报
回复
关注下 期待高手回答

52,782

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 Ajax
社区管理员
  • Ajax
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧