<td><div>品牌:</div></td>
<td><s:select list="carBrandList" id="brand" name="condtionBizBean.brandId" onchange="brandchang(this)" headerKey="" headerValue="请选择" listKey="id" listValue="brandName" cssStyle=" 120px;" /></td>
<td><div>车系:</div></td>
<td>
<select id="series" name="condtionBizBean.seriesId" onchange="serieschang(this)" style=" 120px;">
<option selected="selected" value="">请选择</option>
</select>
</td>
<td><div>车型:</div></td>
<td><select id="carModel" name="condtionBizBean.carTypeId" style=" 120px;">
<option selected="selected" value="">请选择</option>
</slect>
</td>
function brandchang(s){
var brandInnerId=$(s).val();
var path = getRootPath();
$.ajax({url:path+"/carBrandUtil/findSeries.do?brandInnerId="+brandInnerId,
success:function(data){
var obj=data.series;
var n=obj.length;
var htl="<option selected='selected' value=''>请选择</option>";
$("#carModel").html(htl);
for(var i=0;i<n;i++){
htl=htl+"<option value=""+obj[i].id+"">"+obj[i].serisName+"</option>"
}
$("#series").html(htl);
}
});
}
function serieschang(s){
var seriesInnerId=$(s).val();
var path = getRootPath();
$.ajax({url:path+"/carBrandUtil/findCarType.do?seriesInnerId="+seriesInnerId,
success:function(data){
var obj=data.type;
var n=obj.length;
var htl="<option selected='selected' value=''>请选择</option>";
for(var i=0;i<n;i++){
htl=htl+"<option value=""+obj[i].id+"">"+obj[i].simpleName+"</option>"
}
$("#carModel").html(htl);
}
});
}