表数据滚动时候,实现表头固定

  实现表头固定的样式:<tr style="position:relative;top:expression(this.offsetParent.scrollTop-1);">


示例:
<div region="center">
    <table width="100%" border="0" class="Page_Table_Common">
        <tr style="position:relative;top:expression(this.offsetParent.scrollTop-1);">         
  <td class="Page_TableLabel_Center" width="2%">
                <input type="checkbox" onclick="selectmutil();" id="selectAll">
            </td>
            <td class="Page_TableLabel_Center" width="2%">
                序号
            </td>
           <td class="Page_TableLabel_Center"  width="5%">
                编码
            </td>
            <td class="Page_TableLabel_Center" width="12%">
                建筑名称
            </td>
         </tr>

        <ww:iterator value="lsjzjdList" status="rowstatus" id="it">
            <tr ondblclick="viewjzjdInfo('<ww:property value='id'/>','<ww:property value='bhbm'/>')">
                <td class="Page_TableLabel_Center">
                    <input type="checkbox" name="selectOne" value="<ww:property value='id'/>">
                </td>
                <td class="Page_TableLabel_Left">
                    <ww:property value="#rowstatus.index+1"/>
                </td>
                 <td class="Page_TableText_Wrap" title="<ww:property value="bhbm"/>">
                    <ww:property value="bhbm"/>
                </td>
                <td class="Page_TableText_Left" title="<ww:property value="jzmc"/>">
                    <ww:property value="jzmc"/>
                </td>
                        </tr>
        </ww:iterator>
    </table>
    <div id="pagination" class="list_pagination"></div>
</div>

你可能感兴趣的:(表数据滚动时候)