关于动态表格问题.帮帮忙吧. 我的表头和表中查询得到的是数据是动态的.表头有几个字段未定.现在我调出来的4个字段时对齐了.15个就多不齐了.(我指表头和数据对齐).还有加上滚动条就又不齐了.我现在表头和数据是两个表.各位有什么高招啊.谢谢了! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 你用dreamweaver编辑编辑就知道了 一般调colspan 把你的源码贴出来吧。我们一般都是把表头跟数据做成一个表,所以不存在这个问题,你去深入研究一下HTML的相关知识就OK了。 用Table就齐了呀? 一定是程序没有写好 不是啊.用一个TABLE的放话数据多的话就会把表头滚没有了 <%int ilength = 781+ 40*searchForm.getCLSYMD(); String str1 = String.valueOf(ilength) + "px"; String str2 = String.valueOf(ilength+200) + "px"; %> <table width="<%=str1%>" border="0" class="LIST"> <tr> <th rowspan="2" colspan="1" width="23px" class="LIST" nowrap="nowrap">No.</th> <th rowspan="2" colspan="1" width="68px" class="LIST" nowrap="nowrap"> <html:button property="<%=SKConstant.ALL%>" value="すべで選択 " onclick="onSubmit(this.name); " styleClass="BUTTON" style="width:65px"/> </th> <th rowspan="1" colspan="2" class="LIST" nowrap="nowrap">受講者</th> <th rowspan="1" colspan="<bean:write name="sk0511SearchForm" property="CLSYMD" />" <%if (searchForm.getCLSYMD()<4){%>width="150px" <%}%> class="LIST" align="center">出席状況</th> <th rowspan="2" colspan="1" width="65px" class="LIST" nowrap="nowrap">学科試験</th> <th rowspan="2" colspan="1" width="65px" class="LIST" nowrap="nowrap">実技試験</th> <th rowspan="2" colspan="1" width="80px" class="LIST" nowrap="nowrap">修了年月日</th> <th rowspan="2" colspan="1" width="80px" class="LIST" nowrap="nowrap">修了証番号</th> <th rowspan="2" colspan="1" width="70px" class="LIST" nowrap="nowrap">修了状況</th> <th rowspan="2" colspan="1" width="80px" class="LIST" nowrap="nowrap">コメント</th> <th rowspan="2" colspan="1" width="60px" class="LIST" nowrap="nowrap">振替先<BR>予約No.</th> </tr> <tr> <th rowspan="1" colspan="1" width="75px" class="LIST" nowrap="nowrap">氏名</th> <th rowspan="1" colspan="1" width="75px" class="LIST" nowrap="nowrap">会社名</th> <logic:iterate name="sk0511SearchForm" property="clsYmd" id="ymd"> <th rowspan="1" class="LIST" width="40px"> <bean:write name="ymd" /> </th> </logic:iterate> </tr> </table> <div style="height: '290px'; overflow: auto; align=left" > <logic:present name="sk0511SearchForm" property="listForm"> <table class="LIST" style = "WORD-BREAK: break-all" > <logic:iterate name="sk0511SearchForm" property="listForm" id="list"> <tr> <td rowspan="1" colspan="1" width="20px" class="LIST_CENTER"> <bean:write name="list" property="DSPSEQ" /> </td> <td rowspan="1" colspan="1" width="68px" class="LIST_CENTER"> <bean:define id="var" name="list" property="DSPSEQ"/> <% String strid= var.toString();%> <html:multibox property = "checkBox" value ="<%=strid%>"/> </td> <td rowspan="1" colspan="1" width="75px" class="LIST"> <a href=""><bean:write name="list" property="NAM" /></a> </td> <td rowspan="1" colspan="1" width="75px" class="LIST"><bean:write name="list" property="COPNAM" /></td> <%for(int i = 0; i<15; i++){ String str = "CLSATT"; %> <logic:equal property="<%=str + String.valueOf(i+1)%>" name="list" value= "1"> <td rowspan="1" colspan="1" width="41px" class="LIST_CENTER"> ○ </td> </logic:equal> <logic:equal property="<%=str + String.valueOf(i+1)%>" name="list" value= "0"> <td rowspan="1" colspan="1" width="41px" class="LIST_CENTER"> × </td> </logic:equal> <%}%> <td rowspan="1" colspan="1" width="65px" class="LIST_CENTER"> <bean:write name="list" property="WRTTSTNAM1" /> </td> <td rowspan="1" colspan="1" width="65px" class="LIST_CENTER"> <bean:write name="list" property="PRATSTNAM1" /> </td> <td rowspan="1" colspan="1" width="80px" class="LIST_DATE"> <bean:write name="list" property="CERYMD1" /></td> <td rowspan="1" colspan="1" width="80px" class="LIST_CENTER"> <bean:write name="list" property="CERISENO1" /></td> <td rowspan="1" colspan="1" width="70px" class="LIST_CENTER"> <bean:write name="list" property="ENDSTSNAM" /></td> <td rowspan="1" colspan="1" width="80px" class="LIST"> <bean:write name="list" property="COMMENT" /></td> <td rowspan="1" colspan="1" width="60px" class="LIST"> <bean:write name="list" property="NEWRSVNO" /></td> <tr> </logic:iterate> </table> </logic:present> </div> 提交表单为空值 但是查询结果是全部数据 求解释 请教一个sql语句的问题 jsp升级 数据库连接出现问题 请问那里有ajax的编辑器下载 JSP过滤器的问题,求大虾指点 spring中proxyTargetClass和proxyInterfaces两者之间区别? BS架构中何处 处理 数据校验问题? javascript or servlet or 校验封装于存储过程?有经验的说说看 菜鸟提问,如何获得表单中提交的内容 jsp 链接oracle数据库时提示错误信息,看不懂!!! XP更新后无法调用ACITVEX的方法 如何用structs中的logic做resultset的循环
String str1 = String.valueOf(ilength) + "px";
String str2 = String.valueOf(ilength+200) + "px";
%>
<table width="<%=str1%>" border="0" class="LIST">
<tr>
<th rowspan="2" colspan="1" width="23px" class="LIST" nowrap="nowrap">No.</th>
<th rowspan="2" colspan="1" width="68px" class="LIST" nowrap="nowrap">
<html:button property="<%=SKConstant.ALL%>" value="すべで選択 " onclick="onSubmit(this.name); " styleClass="BUTTON" style="width:65px"/>
</th>
<th rowspan="1" colspan="2" class="LIST" nowrap="nowrap">受講者</th>
<th rowspan="1" colspan="<bean:write name="sk0511SearchForm" property="CLSYMD" />" <%if (searchForm.getCLSYMD()<4){%>width="150px" <%}%> class="LIST" align="center">出席状況</th>
<th rowspan="2" colspan="1" width="65px" class="LIST" nowrap="nowrap">学科試験</th>
<th rowspan="2" colspan="1" width="65px" class="LIST" nowrap="nowrap">実技試験</th>
<th rowspan="2" colspan="1" width="80px" class="LIST" nowrap="nowrap">修了年月日</th>
<th rowspan="2" colspan="1" width="80px" class="LIST" nowrap="nowrap">修了証番号</th>
<th rowspan="2" colspan="1" width="70px" class="LIST" nowrap="nowrap">修了状況</th>
<th rowspan="2" colspan="1" width="80px" class="LIST" nowrap="nowrap">コメント</th>
<th rowspan="2" colspan="1" width="60px" class="LIST" nowrap="nowrap">振替先<BR>予約No.</th>
</tr>
<tr>
<th rowspan="1" colspan="1" width="75px" class="LIST" nowrap="nowrap">氏名</th>
<th rowspan="1" colspan="1" width="75px" class="LIST" nowrap="nowrap">会社名</th>
<logic:iterate name="sk0511SearchForm" property="clsYmd" id="ymd">
<th rowspan="1" class="LIST" width="40px">
<bean:write name="ymd" />
</th>
</logic:iterate>
</tr>
</table>
<div style="height: '290px'; overflow: auto; align=left" >
<logic:present name="sk0511SearchForm" property="listForm">
<table class="LIST" style = "WORD-BREAK: break-all" >
<logic:iterate name="sk0511SearchForm" property="listForm" id="list">
<tr>
<td rowspan="1" colspan="1" width="20px" class="LIST_CENTER">
<bean:write name="list" property="DSPSEQ" />
</td>
<td rowspan="1" colspan="1" width="68px" class="LIST_CENTER">
<bean:define id="var" name="list" property="DSPSEQ"/>
<%
String strid= var.toString();%>
<html:multibox property = "checkBox" value ="<%=strid%>"/>
</td>
<td rowspan="1" colspan="1" width="75px" class="LIST">
<a href=""><bean:write name="list" property="NAM" /></a>
</td>
<td rowspan="1" colspan="1" width="75px" class="LIST"><bean:write name="list" property="COPNAM" /></td>
<%for(int i = 0; i<15; i++){
String str = "CLSATT";
%>
<logic:equal property="<%=str + String.valueOf(i+1)%>" name="list" value= "1">
<td rowspan="1" colspan="1" width="41px" class="LIST_CENTER">
○
</td>
</logic:equal>
<logic:equal property="<%=str + String.valueOf(i+1)%>" name="list" value= "0">
<td rowspan="1" colspan="1" width="41px" class="LIST_CENTER">
×
</td>
</logic:equal>
<%}%>
<td rowspan="1" colspan="1" width="65px" class="LIST_CENTER">
<bean:write name="list" property="WRTTSTNAM1" />
</td>
<td rowspan="1" colspan="1" width="65px" class="LIST_CENTER">
<bean:write name="list" property="PRATSTNAM1" />
</td>
<td rowspan="1" colspan="1" width="80px" class="LIST_DATE">
<bean:write name="list" property="CERYMD1" /></td>
<td rowspan="1" colspan="1" width="80px" class="LIST_CENTER">
<bean:write name="list" property="CERISENO1" /></td>
<td rowspan="1" colspan="1" width="70px" class="LIST_CENTER">
<bean:write name="list" property="ENDSTSNAM" /></td>
<td rowspan="1" colspan="1" width="80px" class="LIST">
<bean:write name="list" property="COMMENT" /></td>
<td rowspan="1" colspan="1" width="60px" class="LIST">
<bean:write name="list" property="NEWRSVNO" /></td>
<tr>
</logic:iterate>
</table>
</logic:present>
</div>