How ASP fixed the header row and header column of a table

Source: Internet
Author: User
Tags header relative

There are articles on the header line of a fixed table on the web, but there is almost no one to fix the header row and the title column. Now I write the following code for your reference:
<title>untitled document</title>
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
<script>
function Syncscroll (obj)
{
y.innerhtml = Obj.scrolltop;
x.innerhtml = Obj.scrollleft;
Scroll1.children[0].style.position = "relative";
Scroll2.children[0].style.position = "relative";
Scroll1.children[0].style.left = "-" +obj.scrollleft;
Scroll2.children[0].style.top = "-" +obj.scrolltop;

}
</script>
<body>
<table border= "0" cellpadding= "0" cellspacing= "0" >
<tr>
<td>
<!--***************************************************** Left Upper-begin****************************************** -->

<table width= "height=" "100%" border= "0" cellpadding= "0" cellspacing= "1" bgcolor= "#666666" >
<colgroup>
<col width= ">"
<col width= ">"
<col width= ">"
</colgroup>
<tr bgcolor= "#FFFFFF" >
&LT;TD height= > </td>
<td> </td>
<td> </td>
</tr>
</table>

<!--***************************************************** Left Upper-end******************************************** -->
</td>
<td>
<div id= ' scroll1 ' style= ' Width:450;overflow:hidden ' >
<!--***************************************************** Right-begin****************************************** -->

<table style= "width:900" height= "100%" border= "0" cellpadding= "0" cellspacing= "1" bgcolor= "#666666" >
<colgroup>
<col width= ">"
<col width= ">"
<col width= ">"
<col width= ">"
<col width= ">"
</colgroup>
<tr bgcolor= "#FFFFFF" >
<td> </td>
&LT;TD height= > </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>

<!--***************************************************** Right-end******************************************** -->
</div>
</td>
</tr>
<tr>
&LT;TD align= "left" valign= "Top" >
<div id= ' scroll2 ' style= ' Height:150;overflow-y:hidden;overflow-x:scroll ' >
<!--***************************************************** Left Lower-begin****************************************** -->

<table width= "height=" "100%" border= "0" cellpadding= "0" cellspacing= "1" bgcolor= "#666666" >
<colgroup>
<col width= ">"
<col width= ">"
<col width= ">"
</colgroup>

<tr bgcolor= "#FFFFFF" >
&LT;TD height= > </td>
<td> </td>
<td> </td>
</tr>
<tr bgcolor= "#FFFFFF" >
&LT;TD height= > </td>
<td> </td>
<td> </td>
</tr>
<tr bgcolor= "#FFFFFF" >
&LT;TD height= > </td>
<td> </td>
<td> </td>
</tr>
<tr bgcolor= "#FFFFFF" >
&LT;TD height= > </td>
<td> </td>
<td> </td>
</tr>
<tr bgcolor= "#FFFFFF" >
&LT;TD height= > </td>
<td> </td>
<td> </td>
</tr>
<tr bgcolor= "#FFFFFF" >



Related Article

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.