• 网络学院
  • IT资讯
  • 操作系统
  • 网络技术
  • 软件应用
  • 办公软件
  • 编程技术
  • 网站架设
  • 数据库类
  • 平面设计
  • 多媒体类
  • 游戏资讯
  • 教学论文
  • 认证考试
如何固定表格的标题行和标题列
  站点:
  • 首 页
  • 最新软件
  • 文章教程
  • 国内软件
  • 国外软件
  • 绿色软件
  • 源码下载
  • 字体下载
如何固定表格的标题行和标题列
软件发布 如何固定表格的标题行和标题列
网络软件 系统工具 应用软件 联络聊天 图形图像 多媒体类 行业软件 游戏娱乐 编程开发 安全相关 教育教学 数码软件 绿软下载
热门软件: QQ 瑞星 pplive e话通 木马克星 千千静听 office2000 五笔字根 Photoshop 视频分割
返回文章教程首页 >> 文章首页 >> 操作系统 >> WINDOWS >> Windows 2000 >> 如何固定表格的标题行和标题列

如何固定表格的标题行和标题列

添加时间: 2006-4-24 4:21:26  作者: ASP教程  阅读次数:188   来源: http://d9soft.com

        网上有许关于固定表格的标题行的文章,但是既要固定标题行又要固定标题列的却几乎没有。现我写下如下代码以供大家参考:

<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>

 

上下文章:

 

上一篇文章: WINdows 2K/XP系统优化大攻略 下一篇文章: 在用户离开页面时提示信息

相关文章:

  • 教你如何用零框架技术加密网页
  • PS教程:看看如何用Photoshop把照片演变成水墨画
  • Photoshop教程:教你如何创出发丝的炫彩莹亮效果
  • 魔兽世界:如何更大限度的利用奥冲循环
  • 教你如何用PhotoImpact 来制作逼真的温度计

相关软件:

  • SmartGrid表格控件(Asp.Net DataGrid, Web Grid) V1.5
  • AutoXlsTable(Excel表格导入AutoCAD) V2.52
  • 小牛固定资产管理系统 V6.73 网络版
  • 小牛固定资产管理系统 V6.73 单机版
  • 佳宜固定资产管理软件 V1.91 SQL网络版
  • 佳宜固定资产管理软件 V1.91 企业版

 

快速导航

  • 网络学院
  • 精品汇聚
  • 字体下载
  • 教程下载
  • ASP源码
  • PHP源码
  • Net源码
  • JSP 源码

WINDOWS分类导航

  • Windows 2000
  • Windows 9.x
  • Windows XP
  • Windows 2003
  • Windows Me
  • 注 册 表
  • windows Vista
  • Windows 7

本类经典文章推荐

  • Windows2000也能用Safari浏览器
  • 伪造Cookies,收费电影免费看
  • 解除疑惑 rundll32的作用及应用
  • 高手也谈Windows操作系统的优化
  • 微软新服务让关机只需几秒钟!
  • 张扬个性-教你怎么改Windows系统字...
  • 另类技巧教你“打开文件”提速
  • Windows 2000中NTFS权限介绍以及应...
  • 教你如何快速展开注册表编辑器分支...
  • Windows 2000进程细述

Windows 2000阅读排行

  • WINdows 2K/XP系统优化大攻略
  • MMC不能打开文件MSC文件
  • Windows2000的启动优化(图)
  • 针对系统“内存不足”的解决方法
  • 伪造Cookies,收费电影免费看
  • Windows中如何修改制造商信息
  • 教你如何去掉WIN2000的启动进程
  • 利用Windows2000实现远程控制
  • Windows2000安全设置完全手册
  • 教你如何关闭任务管理器杀不了的进...

WINDOWS阅读总排行

  • 如何打开注册表编辑器
  • 着手教你去优化XP系统
  • 全面深入认识WindowsXP激活
  • 操作系统常见问题:这些.TMP文件可...
  • 系统激活篇:激活WinXP sp2前要了...
  • 秘笈篇:将OEM XP变成零售正版XP
  • ECHO命令的使用
  • WINdows 2K/XP系统优化大攻略
  • 着手一步步教你如何优化 Windows ...
  • MMC不能打开文件MSC文件

广告位置

字母检索 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 回到顶部

关于我们 | 版权声明 | 免责条款 | 广告联系 | 软件发布 | 下载帮助 | 下载排行 | 网站地图 | 特别鸣谢 | 友情连接

copyright; 2005-2008 D9soft.com 第九软件网 版权所有