html页眉页脚独立,修复 HTML table的页眉页脚和左列

Introduction

This code helps fix headers, footer, and left columns of an HTML table.the code uses the different possibilities of JavaScript for dynamically adding HTML components and playing with CSS styles.

This works really well on IE 6 (other versions not tested) but with Mozilla/Firefox i didn't manage to obtain the same results :i had to downgrade some functionalities.

If somebody wishes to migrate the IE code so that it works with Mozilla/Firefox, it would be great (I have no time to do it for the moment).in fact, the major problems are that CSS expressions are available only with IE and that relative/absolute position doesn't work the same in Mozilla/Firefox.

Background

The concept is simple : the table is inserted in a DIV, which offers the possibility to have scrollbars.Header, footer, and left columns are positioned relatively, and CSS expressions make them always visible.the DIV and IFRAME are positioned to hide invisible cells and HTML components ( IFRAME for select boxes, DIV for everything else).

The code is not simple, and requires JavaScript experience to be improved.but analyzing it is a good way to learn the many possibilities offered by this powerful language.

Using the code

Using this library is very simple :all you have to do is call a JavaScript function on an existing table, without modifying existing code (except adding an HTML ID on your table, if not present).var t = new ScrollableTable('myScrollTable', height, width, numberLeftColumns);

The included Zip contains the JS library, and an example HTML page presenting several use cases.

History

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值