Collection of tr objects (rows) in a table with IE8

Discussion in 'JavaScript' started by H2OVN, Aug 27, 2008.

  1. #1
    var oTable = document.getElementById("tbl");
        for (var i = 0; i < oTable.rows.length; i++)
        {
            oTable.rows[i].style.fontWeight = "bold";
        }
    Code (markup):
    tbl is ID of <table>
    with IE run error : rows is null

    how can i use Collection of row objects (rows) in a table with IE8 ?
    with IE7 , 6 no errors.
     
    H2OVN, Aug 27, 2008 IP