css样式-------------------------------------------------------------------------------------------------
.newInscrollTable {
width: 100%;
height: 100%;
overflow-x: scroll;
overflow-y: scroll;
white-space: nowrap
}.newInscrollTable THEAD TD {
white-space: nowrap;
border-left: 2px solid buttonhighlight;
text-align: center;
border-top: 1px solid buttonhighlight;
border-bottom: 1px solid buttonshadow;
border-right: 1px solid buttonshadow;
font: menu;
color: menutext;
background-color: buttonface;
/*cursor: hand;*/
padding-top: 0px;
padding-bottom: 0px;
}.newInscrollTable THEAD TH {
    background: F4F4F4; 
    vertical-align: middle;
    text-align: center;
    white-space: nowrap;
    border: solid 1px #aaaaaa;
    border-top: solid 1px #f0f0f0;
    border-left: solid 1px #f0f0f0;
    position: relative;
    font-weight: bold;
}.newInscrollTable tbody TD {
font-family: 宋体;
font-size: 12px;
line-height: 18px;
white-space: nowrap;
color: #000;
font-size: 12px;
border:1px solid #cad9ea; height:23px; 
ine-height:23px;
}
页面-----------------------------------------------------------------------------------------------------
<span id="resultSpanID" class="resultSpan">
<div style="height: 220px; position: absolute; top: 180px; left: 10px"
id="printdiv">
<div class="newInscrollTable" id="ss">
<TABLE width="220px" cellspacing="0" cellpadding="0" align='center'
id="resultTableID">
...
<thead>
<TR align="center">
<th align="center" nowrap="nowrap" width="40">
<input name="ifcheck" type="checkbox" value="选择"
onclick="chooseAllRow('t1','ifcheck',this.checked)">
</th>
<th align="center" nowrap="nowrap" width="100">
执行结果
</th>
<th align="center" nowrap="nowrap" width="40">
序号
</th>
    ...
<th align="center" nowrap="nowrap" width="100"
style="display: none">
行业大类
</th>
<th align="center" nowrap="nowrap" width="100"
style="display: none">
行业小类
</th>
</TR>
</thead>
<tbody>
...
</tbody>
</TABLE>
</div>
<jsp:include page="../commons/page.jsp" flush="true" />
</div> </span>
实际运行页面图---------------------------------------------------------------------------------------

解决方案 »

  1.   

    CSS不太懂,但是你把最上面一行单独划分出来就应该可以了。最上面一行一定没有必要搞个复选框吧。
      

  2.   


    方案一:table在也页面上分成两部分第一部分是一个table,这个table只有一个表头
    第二部分是一个div套一个table,div设置好大小和可滚动。方案二:
    table 监听鼠标滚轮事件,鼠标进入事件和鼠标移出事件
    当鼠标在table上滚动的时候,根据滚动方向,控制行的显示与展现。