只需要多zipCode(zipCode)函数进行改进

function zipCode(zipCode){
var xmlString="<location> <zipCode>"+zipCode+"</zipCode></location>";//xml文件片段
xmlHttpRequest.open("POST",url,true);
xmlHttpRequest.setRequestHeader("Content-Type","text/xml");//告诉服务器以XML格式发送数据
xmlHttpRequest.send(xmlString);
}