Chinaunix首页 | 论坛 | 博客
  • 博客访问: 262213
  • 博文数量: 82
  • 博客积分: 2502
  • 博客等级: 少校
  • 技术积分: 842
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-04 15:13
文章分类

全部博文(82)

文章存档

2011年(3)

2009年(25)

2008年(54)

我的朋友

分类: 系统运维

2008-09-20 22:31:27

最近做了个Struts2.0的文章发布系统,使用dwr的框架,没想到在firefox下的兼容问题却不好,所以自己网上找了下才知道如何解决,本身我对js也不熟悉,web要学的东西还真多,哎。
table.insertRow()在IE下没问题 但在firefox下就得改为table.insertRow(-1)
同样其相应的insertCell()也要改为insertCell(-1)

var newTh = table.insertRow(-1);
                
                newTh.style.backgroundColor="#C8ECEC";
                newTh.align="center";
                
                //表头TD

                var newTh1 = newTh.insertCell(-1);
                var newTh2 = newTh.insertCell(-1);
                var newTh3 = newTh.insertCell(-1);
                var newTh4 = newTh.insertCell(-1);

阅读(2365) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~