Java下拉列表框显示数据库中某列的值,代码怎么写啊
展开全部
用ajax加载,然后显示在界面上
$.post("roomr!getMyReserves.s",function(data){
var rows = '';
var rooms = data.rows;
for(var i = 0; i< data.length; i ++){
var startTime = data[i].starttime;
var endTime = data[i].endtime;
rows += "<option value='"
+ data[i].id + "'>"
+data[i].roomname + "</option>" ;
}
$("#roomid").html(rows);
});
$.post("roomr!getMyReserves.s",function(data){
var rows = '';
var rooms = data.rows;
for(var i = 0; i< data.length; i ++){
var startTime = data[i].starttime;
var endTime = data[i].endtime;
rows += "<option value='"
+ data[i].id + "'>"
+data[i].roomname + "</option>" ;
}
$("#roomid").html(rows);
});
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询