这是我工作的Ajax函数,但在调用函数后,它会在HTML标记+ required_text中提供响应。Ajax:xmlhttp.responseText响应显示完整的内部HTML而不是关闭所需文本
价值变量 “
(!) Notice: Undefined index: raw_id in C:\wamp\www\ajax\jsvarupdat\remote.php on line 3 |
---|
< /font>
丹尼尔”
价值变量
“丹尼尔”
function call_funct(str){
if (str=="")
{
document.getElementById("scat").innerHTML="";
return;
}
if (window.XMLHttpRequest)
{
xmlhttp=new XMLHttpRequest();
}
else
{
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
value = xmlhttp.responseText;
}
}
xmlhttp.open("post","remote.php?raw_id"+str,true);
xmlhttp.send();
}
2014-04-02
SDA
+0
精确的一两件事请你确定你的PHP脚本没有返回的HTML +的响应,否则包括更多的代码。 –