我有一些輸入的表單;每個輸入都會返回在另一個html頁面的表格中顯示的數據列表。每個輸入都有一個表來顯示它的數據。我的任務是如果輸入不是由用戶輸入,則不顯示數據。java:根據條件隱藏或顯示錶格
這裏是我的代碼
<!-- Country Table-->
<%for(int i = 0; i < countryList.length;i++){
if(countryList.length == 0)
break;
%>
<div class="box" align="center">
<table name="tab" align="center" class="gridtable">
<thead >
<tr>
<th style="width: 50%" scope="col">Entity Watch List Key</th>
<th style="width: 50%" scope="col">Watch List Name</th>
</tr>
</thead>
<tbody>
<tr>
<td style="width: 50%"><%out.println((String) (countryList[i].getEntityWatchListKey()));%></td>
<td style="width: 50%"><%out.println((String) (countryList[i].getEntityName()));%></td>
</tr>
</tbody>
</table>
</div>
<%}%>
我使用突破走出循環做不顯示錶,是真的嗎?