//回调方法
function handleStateChange(){
if (xmlHttp.readyState == 4){
if (xmlHttp.status == 200){
parseResults();
}
}
}
//解析结果
function parseResults(){
var responseDiv = document.getElementById("serverResponse");
if (responseDiv.hasChildNodes()){
responseDiv.removeChild(responseDiv.childNode[0]);
}
var responseText = document.createTextNode(xmlHttp.responseText);
responseDiv.appendChild(responseText);
}
//得到Car对象
function getCarObject(){
return new Car("Dodge","Coronet R/T",1968,"yellow");
}