* 0: The request is uninitialized (before you’ve called open()).
* 1: The request is set up, but not sent (before you’ve called send()).
* 2: The request was sent and is in process (you can usually get content headers from the response at this point).
* 3: The request is in process; often some partial data is available from the response, but the server isn’t finished with its response.
* 4: The response is complete; you can get the server’s response and use it
http.open();
http.onreadystatechange=funcname;
http.readyState==4
res=http.responseText;
//d.g.i=res
http.send()null;