expression 固定表格行列在IE下适用

这是一种在IE下适用的固定行列的方法.其具体代码如下:
复制代码 代码如下:
!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
html
head
title New Document /title
style
.FixedTitleRow
{
position: relative;
top: expression(this.offsetParent.scrollTop);
z-index: 10;
width: 80px;
background-color: #FFCC00;
}
.FixedDataColumn
{ position: relative;
left: expression(this.parentElement.offsetParent.parentElement.scrollLeft);
background-color: #E6ECF0;
}
.FixedColumnAndRows{
position: relative;
top: expression(this.offsetParent.scrollTop);
left: expression(this.offsetParent.scrollLeft);
z-index: 20;
width: 80px;
background-color: #FFCC00;
}
td{word-break : keep-all;}
/style
/head
body
div id="scrollDiv" style="width:500; height:150; overflow: auto; cursor: default; display: inline; position: absolute;"
table width="100%" cellpadding=’0’ cellspacing=’0’ bordercolor=’lightgrey’ border="1" style="table-layout:fixed"
tr bgcolor="#FFCC00" style="font-size:12px; text-align:center; font-weight:bold;height:25px;"
td class="FixedColumnAndRows"header/td
td class="FixedColumnAndRows"header/td
td class="FixedColumnAndRows"header/td
td class="FixedTitleRow"header/td
td class="FixedTitleRow"header/td
td class="FixedTitleRow"header/td
td class="FixedTitleRow"header/td
td class="FixedTitleRow"header/td
td class="FixedTitleRow"header/td
td class="FixedTitleRow"header/td
td class="FixedTitleRow"header/td
td class="FixedTitleRow"header/td
/tr
tr style="font-size:12px; text-align:center;height:20px;"
td class="FixedDataColumn"left/td
td class="FixedDataColumn"left/td
td class="FixedDataColumn"left/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
/tr
tr style="font-size:12px; text-align:center;height:20px;"
td class="FixedDataColumn"left/td
td class="FixedDataColumn"left/td
td class="FixedDataColumn"left/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
/tr
tr style="font-size:12px; text-align:center;height:20px;"
td class="FixedDataColumn"left/td
td class="FixedDataColumn"left/td
td class="FixedDataColumn"left/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
/tr
tr style="font-size:12px; text-align:center;height:20px;"
td class="FixedDataColumn"left/td
td class="FixedDataColumn"left/td
td class="FixedDataColumn"left/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
/tr
tr style="font-size:12px; text-align:center;height:20px;"
td class="FixedDataColumn"left/td
td class="FixedDataColumn"left/td
td class="FixedDataColumn"left/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
/tr
tr style="font-size:12px; text-align:center;height:20px;"
td class="FixedDataColumn"left/td
td class="FixedDataColumn"left/td
td class="FixedDataColumn"left/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td
/tr
tr style="font-size:12px; text-align:center;height:20px;"
td class="FixedDataColumn"left/td
td class="FixedDataColumn"left/td
td class="FixedDataColumn"left/td
td--/td
td--/td
td--/td
td--/td
td--/td
td--/td

推荐阅读