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错误:未指定的错误!
虽然程序没有问题可以使用,但是总提示这个错误!请问怎么解决!谢谢
xmlhttp.setrequestheader("cache-control","no-cache");
xmlhttp.setrequestheader("Content-Type","application/x-www-form-urlencoded");
xmlhttp.send ("title="+encodeURIComponent(document.getElementById("test0").value); 后,会出现
javascript错误:未指定的错误!
虽然程序没有问题可以使用,但是总提示这个错误!请问怎么解决!谢谢
这句少了一个括号,应该是这样
xmlhttp.send ("title="+encodeURIComponent(document.getElementById("test0").value));
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)); 这个是程序里面的!
{
return true;
};