在php中的ajax函数中查询字符串语法以从重定向页面获取结果

时间:2014-06-20 07:34:04

标签: php ajax redirect query-string

<script>
function serviceAdd(rateid,vendorid,countrycode,destination,routetype,rate)
{
alert(rateid+vendorid+countrycode+destination+routetype+rate);  
var xmlhttp;
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {

    document.getElementById("myDiv").innerHTML=xmlhttp.responseText;
    }
  }

xmlhttp.open("GET","check_servicing.php?rate_id="+rateid+"&vendor_id="+vendorid+"&countrycode_id="+countrycode+"&destination_id="+destination+"&routetype_id="+routetype+"&rate="+rate+"",true);
xmlhttp.send();
}
</script>  

这是ajax功能。它的值是获取但不重定向。 此页面未重定向到check_servicing.php。 请帮助!!

0 个答案:

没有答案