//回调函数 function callback(){ if(xmlHttp.readyState==4){ if(xmlHttp.status==200){ var xmlDoc=xmlHttp.responseText; var data=eval(xmlDoc); alert(data[0].userId+","+data[0].userName+","+data[0].userSex); alert(data[1].userId+","+data[1].userName+","+data[1].userSex); }else{ alert("AJAX服务器返回错误!"); } } }