急急急!jsp页面怎么把for循环里的值只输出一遍?
for(inti=0;i<messageList.size();i++){MessageDaomd=(MessageDao)(messageList.get(i));St...
for(int i=0;i<messageList.size();i++){
MessageDao md=(MessageDao)(messageList.get(i));
String DepList=md.getDepList();
String[] Deplist=DepList.split(" ");
%>
<table width="98%" border="0" cellpadding="0" cellspacing="0">
<tr height="25">
<%
for(int y=0;y<Deplist.length;y++){
if(userDeptName.equals(Deplist[y])|| userName.equals(msg.getAuthorName(md.getAuto_id()))){
%>
<td width="4%" align="center" valign="middle" >
</td>
<td align="left" style="line-height:18px;"><a style="cursor: hand" onClick="msgOnclick('<%=md.getAuto_id() %>')"><%=md.getTitle() %></a><a style="color: black">【<%=msg.getMsgKind(md.getType_id()) %>】</a> <a style="color: grey"><%=md.getReleasedate() %></a>
<% if(!msg.getMsgKind(md.getAuto_id()).equals("个人消息")){%><a href="#" onClick="deleteOnclick(<%=md.getAuto_id() %>);return false;">删除</a></td><%} %>
</tr>
<%}%>
<%}%>
</table>
<%} %> 展开
MessageDao md=(MessageDao)(messageList.get(i));
String DepList=md.getDepList();
String[] Deplist=DepList.split(" ");
%>
<table width="98%" border="0" cellpadding="0" cellspacing="0">
<tr height="25">
<%
for(int y=0;y<Deplist.length;y++){
if(userDeptName.equals(Deplist[y])|| userName.equals(msg.getAuthorName(md.getAuto_id()))){
%>
<td width="4%" align="center" valign="middle" >
</td>
<td align="left" style="line-height:18px;"><a style="cursor: hand" onClick="msgOnclick('<%=md.getAuto_id() %>')"><%=md.getTitle() %></a><a style="color: black">【<%=msg.getMsgKind(md.getType_id()) %>】</a> <a style="color: grey"><%=md.getReleasedate() %></a>
<% if(!msg.getMsgKind(md.getAuto_id()).equals("个人消息")){%><a href="#" onClick="deleteOnclick(<%=md.getAuto_id() %>);return false;">删除</a></td><%} %>
</tr>
<%}%>
<%}%>
</table>
<%} %> 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询