Re: [JSP ] 印出全部資料
不曉得這樣是不是你要的...
<%
TestJava.get();
String output="";
for (int i = 0; i < TestJava.List.size(); i++) {
output = TestJava.List.get(i).id + "\t"
+TestJava.List.get(i).test + "\n" ;
%>
output=<%=output%>
<%
output = "<table border=2 cellpadding=2 cellspacing=2 width=1048>
<tr><td width=38>"+ output.replaceAll("\n", "</td></tr><tr>
<td>");
output = output.replaceAll("\t", "</td><td>") + "</tr></table>";
%>
output=<%=output%>
<%
}
%>
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 111.254.206.21
推
06/04 22:37, , 1F
06/04 22:37, 1F
討論串 (同標題文章)
完整討論串 (本文為第 2 之 2 篇):