开发者

not able to display footer using TOM and javascript in mozila

How to diplay footer like this in开发者_开发技巧 mozilla?

<html>
<TABLE ID="oTable_1" BORDER="0" BGCOLOR="lightslategray" width=100% >
<TBODY ID="oTBody0_1"></TBODY>
<TBODY ID="oTBody0_2"></TBODY></TABLE>
<SCRIPT LANGUAGE="JavaScript">

var oTHead = oTable_1.createTHead();
var oTFoot = oTable_1.createTFoot();
var oCaption = oTable_1.createCaption();
var oRow, oCell;

//code  to display table body
//but when i am displayin footer its not displaying in mozila ..working in chrome and IE

oRow = oTFoot.insertRow();
oCell = oRow.insertCell();
oCell.innerHTML = '<center> hi mozilla </center>' ;
oCell.colSpan = "12";
</script>
</html>


Try

oRow = oTFoot.insertRow(-1);
oCell = oRow.insertCell(-1)

The index argument is not optional for insertRow() and insertCell():

If index is -1 or equal to the number of rows, the row is appended as the last row. If index is omitted or greater than the number of rows, an error will result.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜