最近做了个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)
;
http://blog.chinaunix.net/u2/65552/showart_1211865.html