how use rows[] in IE8

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • h2ovn
    New Member
    • Aug 2008
    • 1

    how use rows[] in IE8

    Collection of tr objects (rows) in a table can;t use in IE8.
    Code:
    var oTable = document.getElementById("tbl");
    for (var i = 0; i < oTable.rows.length; i++)
    {
    	oTable.rows[i].style.fontWeight = "bold";
    }
    run with IE 7,6 or firefox ok. but run with IE8 has error rows is null.
    help me. I need use rows. How ?
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    if this is not triggered by an event you could even use simple CSS
    [CODE=css]#tbl {
    font-weight: bold; }
    /* tr and td will inherit that value */[/CODE]

    Comment

    Working...