这个xmlhttp怎么回事?在ie正常,到ff提交就乱码!
时间:2011-07-17
来源:互联网
这个代码怎么在ie正常,但是在FF浏览器,提交的内容都为乱码?
如何解决啊!!!
HTML code
如何解决啊!!!
HTML code
function add(){
var title=document.getElementsByName("title")[0].value;
var tao_xmlhttp;
if(window.ActiveXObject)
try{
tao_xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
}catch(e){
try{
tao_xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}catch(e){ }
}
if (!tao_xmlhttp && window.XMLHttpRequest){
tao_xmlhttp = new XMLHttpRequest();}
if(!tao_xmlhttp) {
alert("你的IE版本太低,请您更新IE6以上版本");
return;
}
document.getElementById('tishi').innerHTML="正在载入...";
tao_xmlhttp.onreadystatechange=function(e){
if(tao_xmlhttp.readyState==4 && tao_xmlhttp.status==200)
document.getElementById('tishi').innerHTML=tao_xmlhttp.responseText;
}
tao_xmlhttp.open("Get","edit.asp?title="+title+"",true);
tao_xmlhttp.send(null);
}
作者: chong6 发布时间: 2011-07-17
我就这个贴没有结,但为何结贴率这么低,我晕!
高手帮忙下,如何解决ff提交乱码的问题,然后我就结贴了!
高手帮忙下,如何解决ff提交乱码的问题,然后我就结贴了!
作者: chong6 发布时间: 2011-07-17
自己解决了!
tao_xmlhttp.open("Get","edit.asp?title="+escape(title)+"",true);
加了 escape就好了!等待送分~~
tao_xmlhttp.open("Get","edit.asp?title="+escape(title)+"",true);
加了 escape就好了!等待送分~~
作者: chong6 发布时间: 2011-07-17
恭喜!
作者: yaxiya 发布时间: 2011-07-17
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28