Php cannot receive POST data of native ajax.

span.onclick=function(ev)
{
    var ev=ev||window.event;
    var target=ev.target||ev.srcElement;
    var url="anime.php?id=" + target.innerText;
    alert(url);
    xmlhttp = new XMLHttpRequest();
    xmlhttp.open("POST",url,true);
    xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
    xmlhttp.send();
    xmlhttp.onreadystatechange=function(){
        if (xmlhttp.readyState==4 && xmlhttp.status==200)
        {
            document.write(xmlhttp.responseText);
        }
    }
}
Mar.18,2021

did not see you send post data.
it is normal not to receive it.


data is written to send ()

Menu