html表格标题如何用代码写,通过技巧固定表格的标题列的代码_html

table#headers {table-layout:fixed;background:#eea033;}

table#data {table-layout:relative;background:#eea033;}

td, th {vertical-align:top;background:#ffffff;}

var rh;

var fr;

var ds;

var hs;

function syncScroll(e) {

hs.scrollLeft = ds.scrollLeft;

}

function syncResize(e) {

hs.style.width = ds.offsetWidth-(ds.offsetWidth – ds.clientWidth);

for( i =0; i < rh.childNodes.length; i++ ) {

rh.childNodes[i].width = fr.childNodes[i].offsetWidth;

}

}

function init() {

rh = document.getElementById(“rh”);

fr = document.getElementById(“fr”);

ds = document.getElementById(“ds”);

hs = document.getElementById(“hs”);

hs.style.top = ds.offsetTop;

hs.style.left = ds.offsetLeft;

hs.style.visibility = ‘visible’;

ds.οnscrοll=syncScroll;

window.οnresize=syncResize;

syncResize();

}

col1col2col3col4col5col6col7col8col9col10
col1col2col3col4col5col6col7col8col9col10
this is a width test– please tell me it worksthis is a width test– please tell me it worksthis is a width test– please tell me it worksthis is a width test– please tell me it worksthis is a width test– please tell me it worksthisisawidthtest– please tell me it worksthis is a width test– please tell me it worksthis is a width test– please tell me it worksthis is a width test– please tell me it worksthis is a width test– please tell me it works
this is a width test– please tell me it worksthis is a width test– please tell me it worksthis is a width test– please tell me it worksthis is a width test– please tell me it worksthis is a width test– please tell me it worksthis is a width test– please tell me it worksthis is a width test– please tell me it worksthis is a width test– please tell me it worksthis is a width test– please tell me it worksthis is a width test– please tell me it works
this is a width test– please tell me it worksthis is a width test– please tell me it worksthis is a width test– please tell me it worksthis is a width test– please tell me it worksthis is a width test– please tell me it worksthis is a width test– please tell me it worksthis is a width test– please tell me it worksthis is a width test– please tell me it worksthis is a width test– please tell me it worksthis is a width test– please tell me it works
col1col2col3col4col5col6col7col8col9col10
col1col2col3col4col5col6col7col8col9col10
this is a width test– please tell me it worksthis is a width test– please tell me it worksthis is a width test– please tell me it worksthis is a width test– please tell me it worksthis is a width test– please tell me it worksthisisawidthtest– please tell me it worksthis is a width test– please tell me it worksthis is a width test– please tell me it worksthis is a width test– please tell me it worksthis is a width test– please tell me it works
this is a width test– please tell me it worksthis is a width test– please tell me it worksthis is a width test– please tell me it worksthis is a width test– please tell me it worksthis is a width test– please tell me it worksthis is a width test– please tell me it worksthis is a width test– please tell me it worksthis is a width test– please tell me it worksthis is a width test– please tell me it worksthis is a width test– please tell me it works
this is a width test– please tell me it worksthis is a width test– please tell me it worksthis is a width test– please tell me it worksthis is a width test– please tell me it worksthis is a width test– please tell me it worksthis is a width test– please tell me it worksthis is a width test– please tell me it worksthis is a width test– please tell me it worksthis is a width test– please tell me it worksthis is a width test– please tell me it works
[/code]

[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]

Header AHeader BHeader C
ABC
ABC
ABC
ABC
ABC
ABC
ABC
ABC
ABC
Header AHeader BHeader C
ABC
ABC
ABC
ABC
ABC
ABC
ABC
ABC
ABC
[/code]

[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]

欢迎大家阅读《通过技巧固定表格的标题列的代码_html》,跪求各位点评,若觉得好的话请收藏本文,by 搞代码

搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权

转载请注明原文链接:通过技巧固定表格的标题列的代码_html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值