<li>号:<select id="ids" name="ids" onchange="opt()">
<c:forEach var="t" items="${terminal}">
<option value="${t.terminalid}" selected>${t.displayname}</option>
</c:forEach>
</select></li>
<li>号:<select id="id" name="id">
<c:forEach var="b" items="${box}">
<option value="${b.boxid}" selected>${b.dispalyname}</option>
</c:forEach>
</select></li>
function opt(){
var id = $("#ids").val();
$.ajax({
type: "POST",
url: "${basePath}/cardInfo/selectByid?id="+id,
success: function(msg){
var myobj=(eval("(" + msg + ")").msg);
$("#id").html("");
$.each(myobj,function(i,val){
$("#id").append("<option value="+val.id+">"+val.name+"</option>");
})
}
});
}