通过ajax post到php,我可以发送多个变量吗?如果可以,语法是什么?
loadXMLDoc("scripts/product_transfer.php?group="+group+"subgroup="+subgroup+"user="+user+,function()
你好!以下是函数代码:
//--------------------------------------------------------------------------------------------------- -----------------------------------------------------------------------
//Function to handle ajax
function loadXMLDoc(url,cfunc)
{
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=cfunc;
xmlhttp.open("POST",url,true);
xmlhttp.send();
}