table表头固定
<div runat= "server " id= 'MainDiv ' style= 'overflow:auto;top:40px;left:10px; ' class= 'coolScrollBar '>
<table runat= "server " border= '1 ' id = "MainTable " style= "font-size:9pt;table-layout:fixed " bordercolor= '#000000 ' cellpadding= '2 ' cellspacing= '0 ' borderColorDark= '#ffffff ' borderColorLight= '#003042 ' onkeydown= "InputGrid_SetKeyDown() ">
<tr class= " ">
<td style= "width:31px " align= "center " > 序号 </td>
</tr>
</table>
</div>
请问这个第一行怎么做到表头固定
[解决办法]
表头固定有两种方式,添加样式,以及直接写脚本控制.
对表头的行添加样式,可参看
http://tech.tom.com/1380/1384/2004225-83576.html
[解决办法]
把width定死不行么?
[解决办法]
接分
[解决办法]
1
[解决办法]
2
[解决办法]
3
[解决办法]
直接设置width不可以吗?
[解决办法]
这贴有水帖的嫌疑#89
[解决办法]
http://topic.csdn.net/t/20050517/13/4013253.html
[解决办法]
把表头和表的主体部分分开,把表的主体放到DIV里就可以了.