根据学习中心刷新报名点

来源:互联网 发布:client mac addr dhcp 编辑:程序博客网 时间:2024/04/30 14:20
//根据studyCenter刷新RegistrationPoint
function refreshRegistrationPointAjax() 
{
   var studyCenterID = document.getElementById("studyCenter").value;   //传参studyCenterID
   refreshRegistrationPoint(studyCenterID);   
}



function refreshRegistrationPoint(studyCenterID){
createXmlHttp();                                    //创建XMLHttpRequest对象
xmlHttp.onreadystatechange = refreshRegistrationPointElement;      //设置回调函数
xmlHttp.open("POST", "../registrationPointByStudyCenterIDAjax", true);  //发送POST请求
xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
xmlHttp.send("studyCenterID="+studyCenterID);
}
 
 
//处理服务器返回的信息 更新报名点下拉框
function refreshRegistrationPointElement() 
{
  if(xmlHttp.readyState == 4) 
{
    if(xmlHttp.status == 200)
    {
    //此处xmlHttp.responseText是请求的*Controller的某个方法返回的渲染页面的源代码
    document.getElementById("registrationPointList").innerHTML = xmlHttp.responseText;
    }
   }
 
}
0 0
原创粉丝点击