function addbus()
{
//清除a标签中的所有元素
// $("#s1").remove();
var chooseIdTypeOne =$("#chooseIdTypeOne2").find("option:selected").val();
$.ajax({
url : "/ftcms/changeProject.do?getOriginalOriginalName="+chooseIdTypeOne,
data : null, // 参数
type : "post",
cache : false,
dataType : "json", //返回json数据
error: function(){
//document.getElementById("chooseIdTypeOnechdranone").options.length = 0;
alert('error');
},
success:onchangecal
});
}
function onchangecal(data){
var chooseIdTypeOne =$("#chooseIdTypeOne2").find("option:selected").val();
document.getElementById("chooseIdTypeOnechdranone2").options.length = 0; //清空原有的option
var str="option value='00000'>请选择/option>";
if(chooseIdTypeOne==1){
$.ajax({
url : "/ftcms/changeProject.do?getOriginalOriginalName="+chooseIdTypeOne,
data : null, // 参数
type : "post",
cache : false,
dataType : "json", //返回json数据
error: function(){
//document.getElementById("chooseIdTypeOnechdranone").options.length = 0;
alert('error');
},
success:onchangecal
});
}
}
}
if(chooseIdTypeOne==2){
for(var i=0;idata.length;i++){
str+="option value='"+data[i].UID+"'>"+data[i].NAME+"/option>"
}
}
if(chooseIdTypeOne==3){
for(var i=0;idata.length;i++){
str+="option value='"+data[i].UID+"'>"+data[i].NAME+"/option>"
}
}
if(chooseIdTypeOne==4){
for(var i=0;idata.length;i++){
str+="option value='"+data[i].UID+"'>"+data[i].NAME+"/option>"
}
}
if(chooseIdTypeOne==5){
for(var i=0;idata.length;i++){
str+="option value='"+data[i].UID+"'>"+data[i].NAME+"/option>"
}
}
if(chooseIdTypeOne==6){
for(var i=0;idata.length;i++){
str+="option value='"+data[i].UID+"'>"+data[i].NAME+"/option>"
}
}
if(chooseIdTypeOne==7){
for(var i=0;idata.length;i++){
str+="option value='"+data[i].UID+"'>"+data[i].NAME+"/option>"
}
}
if(chooseIdTypeOne==8){
for(var i=0;idata.length;i++){
str+="option value='"+data[i].UID+"'>"+data[i].NAME+"/option>"
}
}
if(chooseIdTypeOne==9){
for(var i=0;idata.length;i++){
str+="option value='"+data[i].UID+"'>"+data[i].NAME+"/option>"
}
}
if(chooseIdTypeOne==10){
for(var i=0;idata.length;i++){
str+="option value='"+data[i].UID+"'>"+data[i].NAME+"/option>"
}
}
if(chooseIdTypeOne==11){
for(var i=0;idata.length;i++){
str+="option value='"+data[i].UID+"'>"+data[i].NAME+"/option>"
}
}
if(chooseIdTypeOne==12){
for(var i=0;idata.length;i++){
str+="option value='"+data[i].UID+"'>"+data[i].NAME+"/option>"
}
}
if(chooseIdTypeOne==13){
for(var i=0;idata.length;i++){
str+="option value='"+data[i].UID+"'>"+data[i].NAME+"/option>"
}
}
$("#chooseIdTypeOnechdranone2").html(str);
}