崩溃啊,各位大神帮我找找错误的地方
时间:2011-05-08
来源:互联网
崩溃啊,这个是对着教程上写的,可结果还是错啊
function postword() {
var xmlhttp=new XMLHttpRequest();
xmlhttp.open=("GET","imhello.php?word=hello",ture);
xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
docunment.getElementById("wordone").innerHTML=xmlhttp.responseText;
}
}
xmlhttp.send();
}
</script>
function postword() {
var xmlhttp=new XMLHttpRequest();
xmlhttp.open=("GET","imhello.php?word=hello",ture);
xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
docunment.getElementById("wordone").innerHTML=xmlhttp.responseText;
}
}
xmlhttp.send();
}
</script>
作者: dream1206 发布时间: 2011-05-08
IE显示说网页错误,chrome也没反应,我可以确定这个方法调用正确,也有imhello.php这个页面
作者: dream1206 发布时间: 2011-05-08
xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
去掉。get方法无需这个
去掉。get方法无需这个
作者: net_lover 发布时间: 2011-05-08
var xmlhttp=new XMLHttpRequest();
应该写成
var xmlhttp=window.XMLHttpRequest?new XMLHttpRequest():new ActiveXObject("Microsoft.XMLHTTP");
应该写成
var xmlhttp=window.XMLHttpRequest?new XMLHttpRequest():new ActiveXObject("Microsoft.XMLHTTP");
作者: net_lover 发布时间: 2011-05-08
还是网页有错误,我晕。。。。。
折腾我的眼睛了
折腾我的眼睛了
作者: dream1206 发布时间: 2011-05-08
xmlhttp.onreadystatechange 很明显是这个错误了 改大些的字母没大写 以后别再粗心了 基本的编码习惯都没有
作者: qq413041153 发布时间: 2011-05-08
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28