• <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>
  • 如何固定表格的標題行和標題列

    發表于:2007-07-14來源:作者:點擊數: 標簽:
    網上有許關于固定表格的標題行的文章,但是既要固定標題行又要固定標題列的卻幾乎沒有?,F我寫下如下代碼以供大家參考: html head titleUntitled Document/title meta http-equiv="Content-Type" content="text/html; charset=gb2312" /head script functio
    網上有許關于固定表格的標題行的文章,但是既要固定標題行又要固定標題列的卻幾乎沒有?,F我寫下如下代碼以供大家參考:

    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    </head>
    <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>
      <!--*****************************************************左上-BEGIN*****************************************************-->

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

      <!--*****************************************************左上-END*****************************************************-->
     </td>
        <td>
     <div id='scroll1' style="width:450;overflow:hidden ">
      <!--*****************************************************右上-BEGIN*****************************************************-->

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

      <!--*****************************************************右上-END*****************************************************-->
     </div>
     </td>
      </tr>
      <tr>
        <td align="left" valign="top">
     <div id='scroll2' style="height:150;overflow-y:hidden;overflow-x:scroll">
      <!--*****************************************************左下-BEGIN*****************************************************-->

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

        <tr bgcolor="#FFFFFF">
       <td height="20">&nbsp;</td>
       <td>&nbsp;</td>
       <td>&nbsp;</td>
        </tr>
        <tr bgcolor="#FFFFFF">
       <td height="20">&nbsp;</td>
       <td>&nbsp;</td>
       <td>&nbsp;</td>
        </tr>
        <tr bgcolor="#FFFFFF">
       <td height="20">&nbsp;</td>
       <td>&nbsp;</td>
       <td>&nbsp;</td>
        </tr>
        <tr bgcolor="#FFFFFF">
       <td height="20">&nbsp;</td>
       <td>&nbsp;</td>
       <td>&nbsp;</td>
        </tr>
        <tr bgcolor="#FFFFFF">
       <td height="20">&nbsp;</td>
       <td>&nbsp;</td>
       <td>&nbsp;</td>
        </tr>
        <tr bgcolor="#FFFFFF">
       <td height="20">&nbsp;</td>
       <td>&nbsp;</td>
       <td>&nbsp;</td>
        </tr>
        <tr bgcolor="#FFFFFF">
       <td height="20">&nbsp;</td>
       <td>&nbsp;</td>
       <td>&nbsp;</td>
        </tr>
        <tr bgcolor="#FFFFFF">
       <td height="20">&nbsp;</td>
       <td>&nbsp;</td>
       <td>&nbsp;</td>
        </tr>
        <tr bgcolor="#FFFFFF">
       <td height="20">&nbsp;</td>
       <td>&nbsp;</td>
       <td>&nbsp;</td>
        </tr>
        <tr bgcolor="#FFFFFF">
       <td height="20">&nbsp;</td>
       <td>&nbsp;</td>
       <td>&nbsp;</td>
        </tr>
      </table>

      <!--*****************************************************左下-END*****************************************************-->
     </div>
     </td>
        <td align="left" valign="top">
     <div style="width:450;height:150;overflow:scroll " onscroll="javascript:syncscroll(this)">
      <!--*****************************************************右下-BEGIN*****************************************************-->

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

      <!--*****************************************************右下-END*****************************************************-->
     </div>
     </td>
      </tr>
    </table>
    <p id="y">&nbsp;</p>
    <p id="x">&nbsp;</p>
    </body>
    </html>


    原文轉自:http://www.kjueaiud.com

    老湿亚洲永久精品ww47香蕉图片_日韩欧美中文字幕北美法律_国产AV永久无码天堂影院_久久婷婷综合色丁香五月

  • <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>