Ajax使用onchange方法后怎么才能实现三级联动
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2 no-padding" for="subjectThree">报销明细三级信息:</label>
<div class="col-xs-12 col-sm-10">
<div class="col-xs-12 col-sm-3">
<form:select id="subjectThree" path="subjectThree" class="chosen-select" data-placeholder="点击选择...">
<form:option value="" label=""/>
<form:options items="${subThreeList}" htmlEscape="false" />
</form:select>
</div>
</div>
</div>
function subjectChanges1(obj){
$('#subjectThree').empty();
console.log('w');
var subjectOne=$("#subjectOne").val();
$.ajax({
url:"${ctx}/expensesInfo/info/findsOId",
type:"post",
data:{'contentOne':subjectOne},
success:function(data){
debugger
$("#subjectTwo").val("其他");
$("#subjectTwo").trigger("chosen:updated");
/* var htmlT="请选择......";*/
var htmlT="";//"+xxx+"";
for(var i=0 ; i
htmlT += ""+data[i]+"";
}
$("#subjectTwo").html(htmlT)
$("#subjectTwo").trigger("chosen:updated");
$("#subjectThree").trigger("chosen:updated");
// $("#subjectTwo").append(htmlText);
}
})
}
function subjectChanges2(obj){
debugger
var subjectTwo=$("#subjectTwo").val();
$.ajax({
url:"${ctx}/expensesInfo/info/findsWId",
type:"post",
data:{'contentTwo':subjectTwo},
success:function(data){
var htmlT="请选择......";
for(var i=0 ; i
htmlT += ""+data[i]+"";
}
$("#subjectThree").html(htmlT)
$("#subjectThree").trigger("chosen:updated");
// $("#subjectTwo").append(htmlText);
}
})
}