日期:2014-05-17 浏览次数:20921 次
<script type="text/javascript"> var xmlRequest = null; function startRequest1(url) { if(window.ActiveXObject){ xmlRequest=new ActiveXObject("Microsoft.XMLHTTP"); }else if(window.XMLHttpRequest){ xmlRequest=new XMLHttpRequest(); } xmlRequest.onreadystatechange = getSelect1; xmlRequest.open("get",url,true); xmlRequest.send(null); } function startRequest2(url) { if(window.ActiveXObject){ xmlRequest=new ActiveXObject("Microsoft.XMLHTTP"); }else if(window.XMLHttpRequest){ xmlRequest=new XMLHttpRequest(); } xmlRequest.onreadystatechange = getSelect2; xmlRequest.open("get",url,true); xmlRequest.send(null); } function startRequest3(url) { if(window.ActiveXObject){ xmlRequest=new ActiveXObject("Microsoft.XMLHTTP"); }else if(window.XMLHttpRequest){ xmlRequest=new XMLHttpRequest(); } xmlRequest.onreadystatechange = getSelect3; xmlRequest.open("get",url,true); xmlRequest.send(null); } //一级联动 function getSelect1() { if (xmlRequest.readyState == 4){ if (xmlRequest.status == 200){ var xmlDoc=xmlRequest.responseXML; var s2=document.getElementById("organSecond"); var tag=xmlDoc.getElementsByTagName("organSecond"); for(var j=s2.length;j>=0;j--){ s2.options.remove(i); } for(var i=0;i<tag.length;i++){ var id=tag[i].childNodes[0].childNodes[0].nodeValue; var va=tag[i].childNodes[1].childNodes[0].nodeValue; var op=new Option(va,id); s2.options.add(op); } select2(); } } } //二级联动 function getSelect2() { if (xmlRequest.readyState == 4){ if (xmlRequest.status == 200){ var xmlDoc=xmlRequest.responseXML; var s3=document.getElementById("organThird"); var tag=xmlDoc.getElementsByTagName("organThird"); for(var j=s3.length;j>=0;j--){ s3.options.remove(i); } for(var i=0;i<tag.length;i++){ var id=tag[i].childNodes[0].childNodes[0].nodeValue; var va=tag[i].childNodes[1].childNodes[0].nodeValue; var op=new Option(va,id); s3.options.add(op); } } } } function getSelect3() { if (xmlRequest.readyState == 4){ if (xmlRequest.status == 200){ var xmlDoc=xmlRequest.responseXML; var s4=document.getElementById("positionName"); var tag=xmlDoc.getElementsByTagName("positionName"); for(var j=s4.length;j>=0;j--){ s4.options.remove(i); }