MMTTMM
var method = "get";var url = "test.php";var async = true;var data = "username=" + encodeURIComponent(username) + "&password=" + encodeURIComponent(password)xmlHttp.open(method, url, async);//设置回调函数,接收服务器端的信息以进行处理xmlHttp.onreadystatechange = getServerInfo;//想服务器端发送内容,为什么不起作用呢?xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");xmlHttp.setRequestHeader("Content-Length", data.length);xmlHttp.send(data);