---
title: "jquery ajax后台返回list，前台用jquery遍历list"
author: "xiajava2011"
date: "2011-06-27T14:33:19Z"
tags: []
categories: ["Web前端"]
slug: "jquery-ajax-list-jquery-list"
draft: false
lastmod: "2011-06-27T14:33:19Z"
id: 1106357
url: "https://xiajava2011.iteye.com/blog/1106357"
---

```
$.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;
		}
	});
```