var ajax = new XMLHttpRequest(); ajax.open("get",'apply.php'); ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); ajax.send(null); ajax.onreadystatechange = function() { if ((ajax.readyState == 4) && (ajax.status == 200)) { //返回值 var msg= ajax.responseText; }}