οnchange="changeCardBillInfo(this.value)";
function changeCardBillInfo(obj){
$.ajax({
url: "subsidyManageAction!getCardBillInfo.action",
data : {
type:obj
},
type : "post",
cache : false,
dataType : "json",
error : function(){
sAlert('获取数据错误');
},
success:cardBillInfo
});
}
public String getCardBillInfo(){
cardBillInfoList=this.getBaseService().getCardBillInfoList(type);//支票/转账单信息
return Action.SUCCESS;
}
<result type="json">
<param name="includeProperties">
cardBillInfoList.*
</param>
</result>
function cardBillInfo(data){
document.getElementById('billno').options.length = 0; //清空原有的option
var str = data['cardBillInfoList'];
var html="";
for(i in str){
html+="<option value='"+str[i].billno+"'>"+str[i].billAmt+"</option>"
}
if(html!=""){
$("#billno").html(html);
}
}