ITeye博客

jquery ajax后台返回list,前台用jquery遍历list

xiajava2011 · 2011-06-27 14:33 · jquery · Web前端 · Markdown

$.ajax({
		type: 'post',
		url: "maintain_findRoomByBuildingId.shtml",
		cache: false,
		data: {"buildingId":buildingId},
		dataType: 'json',
		success: function(data){
			jQuery.each(data.roomList, function(i,item){
				alert(item.id+","+item.name);
			});
		},
		error: function(){
			return;
		}
	});

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。