Fixed table ranks (expression) applied to _javascript techniques under IE

Source: Internet
Author: User
This is a method of fixing the ranks in IE. its specific code is as follows:
Copy Code code as follows:

<! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 transitional//en" >
<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>
<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; " >
&LT;TD class= "Fixedcolumnandrows" >header</td>
&LT;TD class= "Fixedcolumnandrows" >header</td>
&LT;TD class= "Fixedcolumnandrows" >header</td>
&LT;TD class= "Fixedtitlerow" >header</td>
&LT;TD class= "Fixedtitlerow" >header</td>
&LT;TD class= "Fixedtitlerow" >header</td>
&LT;TD class= "Fixedtitlerow" >header</td>
&LT;TD class= "Fixedtitlerow" >header</td>
&LT;TD class= "Fixedtitlerow" >header</td>
&LT;TD class= "Fixedtitlerow" >header</td>
&LT;TD class= "Fixedtitlerow" >header</td>
&LT;TD class= "Fixedtitlerow" >header</td>
</tr>
<tr style= "FONT-SIZE:12PX; text-align:center;height:20px; " >
&LT;TD class= "Fixeddatacolumn" >left</td>
&LT;TD class= "Fixeddatacolumn" >left</td>
&LT;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; " >
&LT;TD class= "Fixeddatacolumn" >left</td>
&LT;TD class= "Fixeddatacolumn" >left</td>
&LT;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; " >
&LT;TD class= "Fixeddatacolumn" >left</td>
&LT;TD class= "Fixeddatacolumn" >left</td>
&LT;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; " >
&LT;TD class= "Fixeddatacolumn" >left</td>
&LT;TD class= "Fixeddatacolumn" >left</td>
&LT;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; " >
&LT;TD class= "Fixeddatacolumn" >left</td>
&LT;TD class= "Fixeddatacolumn" >left</td>
&LT;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; " >
&LT;TD class= "Fixeddatacolumn" >left</td>
&LT;TD class= "Fixeddatacolumn" >left</td>
&LT;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; " >
&LT;TD class= "Fixeddatacolumn" >left</td>
&LT;TD class= "Fixeddatacolumn" >left</td>
&LT;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>
</table>
</body>
/* This fixed-line method applies only to IE, and is only suitable for situations with a small amount of data. The amount of data is very much a resource-consuming!*/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.