小试Ajax发现的几个小问题
来源:互联网 发布:房车工程数据 编辑:程序博客网 时间:2024/05/17 01:03
下面是能够正常运行的代码:
<script language="javascript" type="text/javascript">
var XmlHttp=false;
if(window.ActiveXObject){
XmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
else if(window.XMLHttpRequest){
XmlHttp=new XMLHttpRequest();
}
function sendAjax(){
XmlHttp.open("POST","receive.aspx",true);
XmlHttp.onreadystatechange=responsexml;
XmlHttp.send('');
}
function responsexml(){
if(XmlHttp.readyState==4||XmlHttp.readyState=="complete"){
document.getElementById("info").value=XmlHttp.responseText;
}
}
</script>
出现的问题:
1.411错误(firefox)原因是把XmlHttp.send('')写成了XmlHttp.send(null)
2.同样在firefox XmlHttp.readyState写成了XmlHttp.readystate虽然在IE下能运行但在firefox就会出错,
看来firefox对大小写特别敏感!
- 小试Ajax发现的几个小问题
- 最近在研究HaarCascade发现的几个小问题
- 发现Delphi 2005的几个小Bug
- 发现的几个vb小技巧
- 发现VS的小问题
- 几个小问题的整理
- PING的几个小问题!
- HQL的几个小问题
- jquery的几个小问题
- HQL的几个小问题 .
- 数据结构的几个小问题
- ibatis的几个小问题
- 面试的几个小问题?
- 内存的几个小问题
- [IOS] ASIHttpRequest库使用过程中发现的几个小问题
- 《iOS6 application development》学习之路:No.4: 几个coding中发现的小问题
- [IOS] ASIHttpRequest库使用过程中发现的几个小问题
- 发现一个小问题
- 常用的数据库操作(oracle)
- Google TreasureHunt
- 浅析:setsockopt()改善程序的健壮性
- 光雕技术LightScribe简单介绍
- Java载入器概述
- 小试Ajax发现的几个小问题
- 博客开篇
- biee发送预警
- 斗智斗勇
- 关于VS005开发Moss2007相关的插件汇总
- datagrid repeater datalist三者的比较
- CopyFile函数使用(Delphi)
- 三五个人十来条枪 如何走出软件作坊成为开发正规军(三)
- Delphi文件复制