javascript错误:未指定的错误

karno111 2009-07-24 02:27:32
xmlhttp.open("get","ajax_intro.asp?type="+value+"&title="+encodeURIComponent(document.getElementById("test0").value),true);

改成

xmlhttp.open("POST","ajax_intro.asp",true);
xmlhttp.setrequestheader("cache-control","no-cache");
xmlhttp.setrequestheader("Content-Type","application/x-www-form-urlencoded");
xmlhttp.send ("title="+encodeURIComponent(document.getElementById("test0").value);

后,会出现
javascript错误:未指定的错误!
虽然程序没有问题可以使用,但是总提示这个错误!请问怎么解决!谢谢
...全文
222 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
dh20156 2009-07-28
  • 打赏
  • 举报
回复
建议楼主将此部分代码单独挑出来保存文件进行调试,并贴上更详细的错误信息!
valen_jia 2009-07-24
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 showbo 的回复:]
你的处理函数呢?

xmlhttp.send ("title="+encodeURIComponent(document.getElementById("test0").value));

这里少了一个括号吧?

[/Quote]
ZhaoHuiZiXin 2009-07-24
  • 打赏
  • 举报
回复
xmlhttp.send ("title="+encodeURIComponent(document.getElementById("test0").value), null);
weileiweilei110 2009-07-24
  • 打赏
  • 举报
回复
xmlhttp.send ("title="+encodeURIComponent(document.getElementById("test0").value);
这句少了一个括号,应该是这样
xmlhttp.send ("title="+encodeURIComponent(document.getElementById("test0").value));
Go 旅城通票 2009-07-24
  • 打赏
  • 举报
回复
你的处理函数呢?

xmlhttp.send ("title="+encodeURIComponent(document.getElementById("test0").value));

这里少了一个括号吧?
wujinjian2008n 2009-07-24
  • 打赏
  • 举报
回复
即然程序没错误那就不用找了, 加如下代码即可。

window.onerror=function ()
{
return true;
};
karno111 2009-07-24
  • 打赏
  • 举报
回复
不是那个问题!我程序里面有括号的!这里粘贴错了!

xmlhttp.open("POST","ajax_intro.asp",true);
xmlhttp.setrequestheader("cache-control","no-cache");
xmlhttp.setrequestheader("Content-Type","application/x-www-form-urlencoded");
xmlhttp.send ("type="+value+"&title="+encodeURIComponent(document.getElementById("test0").value));

这个是程序里面的!

87,907

社区成员

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

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