日期:2014-05-16  浏览次数:20351 次

jstl遍历jsp集合对象

var obj;

var?arraysBooks=new Array();

var sa="<c:forEach var='obj' items='${phoneBookCardLists}'> "+

(obj =new Object())+

(obj.cardid="${obj.cardid}")+

(obj.userName="${obj.userName}")+

(obj.gender="${obj.gender}")+

(obj.birthday="${obj.birthday}")+

(obj.nation="${obj.nation}")+

(obj.political="${obj.political}")+

(obj.degree="${obj.degree}")+

(obj.profession="${obj.profession}")+

(obj.company="${obj.company}")+

(obj.classs="${obj.classs}")+

(obj.position="${obj.position}")+

(obj.address="${obj.address}")+

(obj.postcode="${obj.postcode}")+

(obj.fex="${obj.fex}")+

(obj.phone="${obj.phone}")+

(obj.mobile="${obj.mobile}")+

(obj.email="${obj.email}")+

(obj.groupName="${obj.groupName}")+

(obj.addGroupTime="${obj.addGroupTime}")+

(obj.city="${obj.city}")+

(obj.profile="${obj.profile}")+

(obj.status="${obj.status}")+

(obj.createTime="${obj.createTime}")+

(obj.remark="${obj.remark}")+

(obj.forget="${obj.forget}")+

(obj.reserve="${obj.reserve}")+

(arraysBooks.push(obj))+

"</c:forEach>";

alert(arraysBooks.length);